All variables in sp500.dta
| Variable |
Graph |
Type |
N |
Descriptives |
Label |
[+]
change
@sp500.dta |
|
other
(float)
|
247
(.)
|
(x̄=-0.547, 15.845) [-53.770,64.290] |
Closing price change |
All properties
| key |
content |
| N |
247 |
| N_unique |
. |
| class |
other |
| example0 |
. |
| histh |
.00102878, .00051439, .00205755, .00565827, .01388849, .01697482, .02983454, .02674821, .01646043, .00925899, .00205755, .00102878, .00102878, .00051439 |
| histw |
-49.834682, -41.964012, -34.093342, -26.222673, -18.352001, -10.481332, -2.6106608, 5.2600098, 13.13068, 21.00135, 28.872021, 36.742691, 44.613361, 60.354702 |
| label |
Closing price change |
| max |
64.290 |
| mean |
-0.547 |
| min |
-53.770 |
| sd |
15.845 |
| type |
float |
Data Manipulations with change
| file |
# |
command |
|
base/a/arch.ado:
|
552 [+]
|
qui
gen
double `wt_e2' = .7^(`timevar'-r(tmin))*$Te2 /*
*/
if `touse'
|
|
:
|
1131 [+]
|
qui
gen
double $Te_tarch = ($Te > 0)*$Te2
|
|
base/a/arch_dr.ado:
|
86 [+]
|
qui
gen
double `wt_e2' = /*
*/ .7^($Ttimevar-$Ttimemin)*$Te2 /*
*/
if $ML_samp
|
|
:
|
208 [+]
|
qui
gen
double `wt_e2' = /*
*/ .7^($Ttimevar-$Ttimemin)*$Te2
if $ML_samp
|
|
base/b/boxcox_p.ado:
|
80 [+]
|
gen
`vtyp' `varn' = (e(L)*`xb'+1)^(1/e(L)) /*
*/
if `touse'
|
|
base/b/bsample.ado:
|
168 [+]
|
gen
`r' = int(uniform()*`nmax' + 1)
|
|
:
|
357 [+]
|
gen
double `r' = int(uniform()*`nclust' + 1)
in 1/`nclust'
|
|
:
|
539 [+]
|
by `strata' `clid' `obsid':
replace
`r' = (`clid'-1)*`nclust'+_n-1
|
|
:
|
574 [+]
|
by `strata' `clid' `obsid':
replace
`r' = (`clid'-1)*`nclust'+_n-1
|
|
base/b/bsample_7.ado:
|
99 [+]
|
gen
double `r' = int(uniform()*`nclust' + 1)
in 1/`nclust'
|
|
:
|
115 [+]
|
by `clid' `obsid':
replace
`r' = (`clid'-1)*`nclust'+_n-1
|
|
base/c/clogit.ado:
|
654 [+]
|
qui by `touse' `group':
gen
double `i' = (_n==1&`touse')*`freq'
|
|
base/c/cluster.ado:
|
2291 [+]
|
qui by `tousevar' :
gen
long `grpvar' = /*
*/ int(((_n-1)/_N)*`k') + 1
if `tousevar'
|
|
:
|
2391 [+]
|
qui
replace
`var'=uniform()*`vrange'+`vmin' /*
*/
in `Np1'/`newN'
|
|
base/c/cluster_tree_8.ado:
|
905 [+]
|
qui
gen
double `cind' = `lbuf' + (`ncols'-`rbuf'-`lbuf')*`atx'/`maxx' /*
*/
if `atx' < .
|
|
base/c/cusum.ado:
|
44 [+]
|
replace
`x' = `x'+uniform()*`jx'
-
/*
To avoid ties and ensure a unique sort order for x,
randomly jitter x by .00001 times its range using a fixed seed
Answer: No, setting the seed screws up Monte Carlo experiments.
*/
replace `x' = `x'+uniform()*`jx'
|
|
base/c/cusum_7.ado:
|
27 [+]
|
replace
`x' = `x'+uniform()*`jx'
-
/*
To avoid ties and ensure a unique sort order for x,
randomly jitter x by .00001 times its range using a fixed seed
Answer: No, setting the seed screws up Monte Carlo experiments.
*/
replace `x' = `x'+uniform()*`jx'
|
|
base/d/dfgls.ado:
|
126 [+]
|
gen
double `dty'=`varlist'-_b[`iota']-_b[`qdtrd']*`trd'
|
|
base/d/dvech_p.ado:
|
700 [+]
|
qui
predict
double `res'*
if `touse'
, residuals
|
|
base/e/ereg.ado:
|
172 [+]
|
gen
double `lnf' = `wv' * ///
(`d'*`cons'-exp(`cons')*`realt')
|
|
base/e/ereg_lf.ado:
|
13 [+]
|
quietly
replace
`g1' = $ML_y2-exp(`I')*$ML_y1
|
|
base/e/ereg_p.ado:
|
348 [+]
|
gen
`typlist' `varlist' = `minus'(`d'-exp(`minus'`I')*`t')
if `touse'
|
|
base/e/ereghet_glf.ado:
|
22 [+]
|
gen
double `b' = exp(`beta')*`t'
if $ML_samp
|
|
:
|
23 [+]
|
gen
double `b0' = cond(`t0'>0, exp(`beta')*`t0',0) /*
*/
if $ML_samp
|
|
base/e/ereghet_gp.ado:
|
206 [+]
|
qui
gen
double `ff'= 1+`theta'*exp(`xb')*`t'
if `touse'
|
|
:
|
207 [+]
|
qui
gen
double `ff0'= 1+`theta'*exp(`xb')*`t0' /*
*/
if `t0'>0 & `touse'
|
|
:
|
236 [+]
|
qui
gen
double `ff'= /*
*/ (`d'!=0)-(1/`theta')* /*
*/ ln(1+`theta'*exp(`xb')*`t')
if `touse'
|
|
:
|
239 [+]
|
qui
replace
/*
*/ `ff'=`ff'+(1/`theta')* /*
*/ ln(1+`theta'*exp(`xb')*`t0') /*
*/
if `t0'>0 & `touse'
|
|
base/e/ereghet_ilf.ado:
|
21 [+]
|
gen
double `b' = exp(`beta')*`t'
if $ML_samp
|
|
:
|
22 [+]
|
gen
double `b0' = cond(`t0'>0, exp(`beta')*`t0',0) /*
*/
if $ML_samp
|
|
:
|
53 [+]
|
gen
double `dt' = `th'*(`f'*`f'/`c' - cond(`t0'>0, /*
*/ `f0'*`f0'/`c0',0) - `d'*`f'/`c'* /*
*/ (1-2*`th'*`f'/`c'))
|
|
base/e/ereghet_ilf_sh.ado:
|
97 [+]
|
replace
`dz' = cond(`sumd'<., /*
*/ -(1/`c' - 1)*`ith'^2 + /*
*/ `c'*`sums'*(`a'*`sums' - `ith') , 0) /*
*/
if $ML_samp
|
|
base/e/ereghet_ip.ado:
|
206 [+]
|
qui
gen
double `ff'= 1+2*`theta'*exp(`xb')*`t'
if `touse'
|
|
:
|
207 [+]
|
qui
gen
double `ff0'= 1+2*`theta'*exp(`xb')*`t0' /*
*/
if `t0'>0 & `touse'
|
|
:
|
236 [+]
|
qui
gen
double `ff'= /*
*/ (`d'!=0)+(1/`theta')* /*
*/ (1-sqrt(1+2*`theta'*exp(`xb')*`t'))
if `touse'
|
|
:
|
239 [+]
|
qui
replace
/*
*/ `ff'=`ff'-(1/`theta')* /*
*/ (1-sqrt(1+2*`theta'*exp(`xb')*`t0')) /*
*/
if `t0'>0 & `touse'
|
|
base/e/etpoisson_p.ado:
|
111 [+]
|
gen
`typlist' `varlist' = ///
exp(((`sigma'^2)/2))* ///
(exp(`xb1')-exp(`xb0'))*`onswitch'
|
|
base/f/fpredict.ado:
|
106 [+]
|
quietly
gen
`type' `newvar'=`RSTU'*`RES'/sqrt((1-`HAT')*`SRES'[_N])
|
|
base/f/frac_mun.ado:
|
9 [+]
|
cap
drop
`name'*
All properties
| key |
content |
| command |
drop |
| indent |
2 |
| parameters |
`name'* |
| prefix |
cap |
|
|
base/f/fracpred.ado:
|
173 [+]
|
replace
`v' = `v'+((`j'<`i')+1)*`V'[`i',`j']*`xi'*`xj'
|
|
:
|
184 [+]
|
replace
`v'=`v'+2*`V'[`ncons',`i']*`xi'
|
|
:
|
201 [+]
|
replace
`v'=`v'+`xb'_b[`xi']*`xi'
|
|
base/f/fron_p.ado:
|
163 [+]
|
gen
`vtyp' `varn'=`mu1'+`sigma1'* /*
*/ (normd(-`z')/norm(`z')) /*
*/
if `cond'
|
|
base/f/fron_tn.ado:
|
45 [+]
|
qui
gen
double `w1' = (1-`gamma')*`zd' /*
*/ - $S_COST*`gamma'*(`ytilde'-`xb')
|
|
:
|
70 [+]
|
qui
gen
double `dditdg' = -.5*`zd'*(`gamma'^(-1.5))*`dgt'
|
|
:
|
81 [+]
|
qui
gen
double `gj2' = -(`ytilde'-`xb'+$S_COST*`zd')*$S_COST /*
*/ - `ratio1'/sqrt(`gamma') /*
*/ + `ratio2'*`dditsdzd'
|
|
:
|
90 [+]
|
qui
gen
double `dw1' = (-`zd'-$S_COST*(`ytilde'-`xb'))*`dgt'
|
|
:
|
122 [+]
|
qui
gen
double `d2w2' = `dw2'*(-0.5/`gamma'+0.5/(1-`gamma'))*`dgt' /*
*/ + `w2'*(0.5/(`gamma'^2)+0.5/(1-`gamma')^2)*`dgt'*`dgt' /*
*/ + `w2'*(-0.5/`gamma'+0.5/(1-`gamma'))*`d2gdg2'
|
|
base/g/gamhet_gp.ado:
|
144 [+]
|
gen
`vtyp' `varn'=exp(`sgn'sqrt(`ga')*`sigma'* /*
*/ ln(`cc'/`ga') + `xb')
if `touse'
|
|
:
|
165 [+]
|
gen
`vtyp' `varn'=(`sgn'sqrt(`ga')*`sigma'* /*
*/ ln(`cc'/`ga') + `xb')
if `touse'
|
|
:
|
203 [+]
|
qui
gen
double `ff'= exp(-`uu')*`uu'^(`ga'-1)* /*
*/ exp(-lngamma(`ga'))*`uu'/(sqrt(`ga')*`sigma'*`t') /*
*/
if `touse'
|
|
base/g/gamhet_ip.ado:
|
144 [+]
|
gen
`vtyp' `varn'=exp(`sgn'sqrt(`ga')*`sigma'* /*
*/ ln(`cc'/`ga') + `xb')
if `touse'
|
|
:
|
165 [+]
|
gen
`vtyp' `varn'=(`sgn'sqrt(`ga')*`sigma'* /*
*/ ln(`cc'/`ga') + `xb')
if `touse'
|
|
:
|
203 [+]
|
qui
gen
double `ff'= exp(-`uu')*`uu'^(`ga'-1)* /*
*/ exp(-lngamma(`ga'))*`uu'/(sqrt(`ga')*`sigma'*`t') /*
*/
if `touse'
|
|
base/g/gamma_d2.ado:
|
66 [+]
|
replace
`g1' = `dIdx'*`u'/ /*
*/ (sqrt(`l')*`sig'*`et')
if $ML_samp
|
|
:
|
74 [+]
|
replace
`g1' = `g1' - /*
*/ `dI0dx'*`u0'/ /*
*/ (sqrt(`l')*`sig'*`et0')
if $ML_samp & `t0'>0
|
|
:
|
80 [+]
|
replace
`g2' = `u'*`z'*sign(`k')* /*
*/ `dIdx' / /*
*/ (sqrt(`l')*`et')
if $ML_samp
|
|
:
|
84 [+]
|
replace
`g2' = `g2' - `d'* `g2'
All properties
| key |
content |
| command |
replace |
| indent |
2 |
| parameters |
`g2' = `g2' - `d'* `g2' |
|
|
:
|
86 [+]
|
replace
`g2' = `g2' + `d'*( /*
*/ (`z'* sqrt(`l'))*(`u'/`l' - 1) - 1)
if $ML_samp
|
|
:
|
89 [+]
|
replace
`g2' = `g2' - `u0'*`z0'*sign(`k')* /*
*/ `dI0dx'/ /*
*/ (sqrt(`l')*`et0')
if $ML_samp & `t0' > 0
|
|
:
|
95 [+]
|
replace
`g3' = (2.0*`l'*sqrt(`l')*`detl' - /*
*/ (`z' - 2.0*sqrt(`l'))* /*
*/ `dIdx'*`u')/`et'
if $ML_samp
|
|
:
|
101 [+]
|
replace
`g3' = `g3' + `d'* /*
*/ (-2.0*sign(`k')*`l'*sqrt(`l')* /*
*/ (ln(`l') +(`l' -0.5)/`l' - digamma(`l')) - /*
*/ sign(`k')*`z'*`l' - /*
*/ sign(`k')*`u'*(`z' - 2.0*sqrt(`l')))
if $ML_samp
|
|
:
|
107 [+]
|
replace
`g3' = `g3' - /*
*/ (2.0*`l'*sqrt(`l')*`det0l' - /*
*/ (`z0' - 2.0*sqrt(`l'))* /*
*/ `dI0dx'*`u0')/`et0'/*
*/
if $ML_samp & `t0'> 0
|
|
:
|
127 [+]
|
gen
double `d11' = (-`et'*`u'*sign(`k')*(`d2Idxdx'*`u' + /*
*/ `dIdx') - `u'^2*`dIdx'^2)/((`et'^2)*`l'*`sig'^2)
if $ML_samp
|
|
:
|
137 [+]
|
replace
`d11' = (1 - `d')*`d11'
if $ML_samp
|
|
:
|
141 [+]
|
replace
`d11' = `d11' - (-`et0'*`u0'*sign(`k')*(`d2I0dxdx' /*
*/ *`u0' + `dI0dx') - `u0'^2*`dI0dx'^2)/(`et0'^2*`l'*`sig'^2)/*
*/
if $ML_samp & `t0'>0
|
|
:
|
153 [+]
|
generate
double `d12' = -`u'*`z'*(`dIdx' +`u'*`d2Idxdx')/ /*
*/ (`et'*`l'*`sig') - `u'*`dIdx'*(`et'*sqrt(`l') + /*
*/ sign(`k')*`dIdx'*`u'*`z')/(`et'^2*`l'*`sig')
if $ML_samp
|
|
:
|
164 [+]
|
replace
`d12' = (1 - `d')*`d12'
if $ML_samp
|
|
:
|
169 [+]
|
replace
`d12' = `d12' +`u0'*`z0'*(`dI0dx' +`u0'*`d2I0dxdx')/ /*
*/ (`et0'*`l'*`sig') + `u0'*`dI0dx'*(`et0'*sqrt(`l') + /*
*/ sign(`k')*`dI0dx'*`u0'*`z0')/(`et0'^2*`l'*`sig') /*
*/
if $ML_samp & `t0'> 0
|
|
:
|
182 [+]
|
generate
double `d13' = `u'*sign(`k')* /*
*/ ((`z'-2*sqrt(`l'))*(`dIdx'/*
*/ + `u'*`d2Idxdx') - 2*`l'*sqrt(`l')*`d2Idadx')/ /*
*/ (`et'*sqrt(`l')*`sig') - `u'*`dIdx'*(2*`l'*sqrt(`l')* /*
*/ `detl' - sign(`k')*sqrt(`l')*`et' - /*
*/ `u'*(`z' - 2*sqrt(`l'))*`dIdx')/((`et'^2)*sqrt(`l')*`sig')/*
*/
if $ML_samp
|
|
:
|
209 [+]
|
replace
`d13' = (1 - `d')*`d13'
if $ML_samp
|
|
:
|
214 [+]
|
generate
double `d130' = /*
*/ `u0'*sign(`k')*((`z0'-2*sqrt(`l'))*(`dI0dx'/*
*/ + `u0'*`d2I0dxdx') - 2*`l'*sqrt(`l')*`d2I0dadx')/ /*
*/ (`et0'*sqrt(`l')*`sig') - `u0'*`dI0dx'*(2*`l'*sqrt(`l')* /*
*/ `det0l' - sign(`k')*sqrt(`l')*`et0' - /*
*/ `u0'*(`z0' - 2*sqrt(`l'))*`dI0dx')
|
|
:
|
245 [+]
|
generate
double `d22' = (-`et'*sign(`k')*`u'*`z' /*
*/ *(`d2Idxdx'*`u'*`z' + `z'*`dIdx' + sqrt(`l')*`dIdx') - /*
*/ (`u'*`z')^2*`dIdx'^2)/(`et'^2*`l')
if $ML_samp
|
|
:
|
257 [+]
|
replace
`d22' = (1-`d')*`d22'
if $ML_samp
|
|
:
|
262 [+]
|
replace
`d22' = `d22' - /*
*/ (-`et0'*sign(`k')*`u0'*`z0' /*
*/ *(`d2I0dxdx'*`u0'*`z0' + `z0'*`dI0dx' + /*
*/ sqrt(`l')*`dI0dx') - /*
*/ (`u0'*`z0')^2*`dI0dx'^2)/(`et0'^2*`l') /*
*/
if $ML_samp & `t0' > 0
|
|
:
|
278 [+]
|
generate
double `d23' = `u'*`z'*(`et'*sqrt(`l')*( /*
*/ (`z'-2*sqrt(`l'))*(`u'*`d2Idxdx' + `dIdx') - /*
*/ 2*`d2Idadx'*`l'*sqrt(`l')) - sign(`k')*`dIdx'*( /*
*/ -`dIdx'*sqrt(`l')*`u'*(`z' - 2*sqrt(`l')) + /*
*/ 2*`detl'*`l'^2 - `et'*sign(`k')*`l'))/(`et'^2*`l') /*
*/
if $ML_samp
|
|
:
|
296 [+]
|
replace
`d23' = (1-`d')*`d23'
if $ML_samp
|
|
:
|
298 [+]
|
replace
`d23' = `d23' + `d'* /*
*/ sign(`k')*(`z'*`u'+ `z'*`l' + /*
*/ `z'*`u'*(`z'- 2*sqrt(`l'))/sqrt(`l')) /*
*/
if $ML_samp
|
|
:
|
303 [+]
|
replace
`d23' = `d23' - /*
*/ `u0'*`z0'*(`et0'*sqrt(`l')*( /*
*/ (`z0'-2*sqrt(`l'))*(`u0'*`d2I0dxdx' + `dI0dx') - /*
*/ 2*`d2I0dadx'*`l'*sqrt(`l')) - sign(`k')*`dI0dx'*( /*
*/ -`dI0dx'*sqrt(`l')*`u0'*(`z0' - 2*sqrt(`l')) + /*
*/ 2*`det0l'*`l'^2 - `et0'*sign(`k')*`l'))/(`et0'^2*`l') /*
*/
if $ML_samp & `t0' > 0
|
|
:
|
326 [+]
|
generate
double `d33' = 2*sign(`k')*`l'^2*(-3*`detl' /*
*/ + `u'*(`z'-2*sqrt(`l'))*`d2Idadx'/sqrt(`l') /*
*/ - 2*`l'*`ddetl')/`et'
if $ML_samp
|
|
:
|
330 [+]
|
replace
`d33' = `d33' - 2*`l'*sqrt(`l')*`detl'*( /*
*/ -`u'*(`z' - 2*sqrt(`l'))*`dIdx' /*
*/ + 2*`l'*sqrt(`l')*`detl')/(`et'^2)
if $ML_samp
|
|
:
|
334 [+]
|
replace
`d33' = `d33' - sign(`k')*`u'*( /*
*/ ((`z'-2*sqrt(`l'))^2)*(`dIdx' + `u'*`d2Idxdx') /*
*/ + 2*`l'*`dIdx' /*
*/ - 2*`l'*sqrt(`l')*(`z'-2*sqrt(`l'))*`d2Idadx')/`et' /*
*/
if $ML_samp
|
|
:
|
340 [+]
|
replace
`d33' = `d33' + `u'*(`z'-2*sqrt(`l'))*`dIdx'* /*
*/ (-`u'*(`z'-2*sqrt(`l'))*`dIdx' /*
*/ + 2*`l'*sqrt(`l')*`detl')/(`et'^2)
if $ML_samp
|
|
:
|
345 [+]
|
replace
`d33' = (1-`d')*`d33'
if $ML_samp
|
|
:
|
355 [+]
|
replace
`d33' = `d33' - 2*sign(`k')*(`l'^2)*(-3*`det0l' /*
*/ + `u0'*(`z0'-2*sqrt(`l'))*`d2I0dadx'/sqrt(`l') /*
*/ - 2*`l'*`ddet0l')/`et0'
if $ML_samp & `t0'>0
|
|
:
|
359 [+]
|
replace
`d33' = `d33' + 2*`l'*sqrt(`l')*`det0l'*( /*
*/ -`u0'*(`z0' - 2*sqrt(`l'))*`dI0dx' /*
*/ + 2*`l'*sqrt(`l')*`det0l')/(`et0'^2)
if $ML_samp & `t0'>0
|
|
:
|
363 [+]
|
replace
`d33' = `d33' + sign(`k')*`u0'*( /*
*/ ((`z0'-2*sqrt(`l'))^2)*(`dI0dx' + `u0'*`d2I0dxdx') /*
*/ + 2*`l'*`dI0dx' /*
*/ - 2*`l'*sqrt(`l')*(`z0'-2*sqrt(`l'))*`d2I0dadx')/`et0' /*
*/
if $ML_samp & `t0'>0
|
|
:
|
369 [+]
|
replace
`d33' = `d33' - `u0'*(`z0'-2*sqrt(`l'))*`dI0dx'* /*
*/ (-`u0'*(`z0'-2*sqrt(`l'))*`dI0dx' /*
*/ + 2*`l'*sqrt(`l')*`det0l')/(`et0'^2)
if $ML_samp & `t0'>0
|
|
base/g/gamma_p.ado:
|
148 [+]
|
qui
replace
`varn'= `sgn'*log(`varn')*`sigma' /*
*/ +(abs(`kappa')*`xb')
|
|
:
|
234 [+]
|
qui
gen
double `ff'=((`l'-0.5)*ln(`l')) /*
*/ + (`z'*sqrt(`l'))-`l'*exp(`z'/sqrt(`l')) /*
*/ -lngamma(`l') - ln(`t'* `sigma')
if `touse'
|
|
base/g/glim_l01.ado:
|
19 [+]
|
gen
double `mu' = `eta'*$SGLM_m
|
|
base/g/glim_l04.ado:
|
20 [+]
|
gen
double `return' = `mu'*(1+`mu'*$SGLM_a)
|
|
:
|
24 [+]
|
gen
double `return' = `mu'*(1+`mu'*$SGLM_a)*(1+2*`mu'*$SGLM_a)
|
|
base/g/glim_l09.ado:
|
27 [+]
|
gen
double `return' = 2*`mu'*`mu'*`mu'/($SGLM_m*$SGLM_m)
|
|
base/g/glim_l11.ado:
|
23 [+]
|
gen
double `return' = `mu'^(1-$SGLM_p)*$SGLM_m^$SGLM_p/$SGLM_p
|
|
:
|
27 [+]
|
gen
double `return' = `mu'^(1-2*$SGLM_p)*(1/$SGLM_p)* /*
*/ (1/$SGLM_p-1)*$SGLM_m^$SGLM_p
|
|
base/g/glim_lf.ado:
|
33 [+]
|
qui
replace
`score' = ($ML_y1 - `mu')/(`phi'*`v')*`dmu'
if $ML_samp
|
|
base/g/glim_p.ado:
|
211 [+]
|
qui
gen
double `pt' = _b[`t']*`t'
|
|
base/g/glim_v6.ado:
|
31 [+]
|
gen
double `return' = `mu'+`mu'*`mu'*$SGLM_a
|
|
:
|
43 [+]
|
gen
double `return' = cond(`y'==0, /*
*/ 2*ln(1+`mu'*$SGLM_a)/$SGLM_a, /*
*/ 2*(`y'*ln(`y'/`mu') - /*
*/ (1+`y'*$SGLM_a)/$SGLM_a * /*
*/ ln((1+`y'*$SGLM_a)/(1+`mu'*$SGLM_a))))
|
|
:
|
90 [+]
|
gen
double `return' = (2 - `mu') / sqrt(`mu'+`mu'*`mu'*$SGLM_a)
|
|
base/g/glm.ado:
|
2140 [+]
|
qui
replace
`vt1' = `x'[_n-`j']*`res'*`res'[_n-`j']* /*
*/ `wv'[_n-`j']
if `touse'
|
|
base/g/glm_p.ado:
|
122 [+]
|
gen
double `V' = (`mu'+`e(k)'*`mu'^2)
if `touse'
|
|
base/g/glmpred.ado:
|
118 [+]
|
gen
double `V' = (`mu'+`e(k)'*`mu'^2)
|
|
base/g/gmm.ado:
|
1118 [+]
|
qui
replace
`normwt' = r(N)*`normwt'/r(sum)
|
|
base/g/gomp_lf.ado:
|
29 [+]
|
gen
double `et0' = exp(`g'*$EREGt0)
|
|
:
|
43 [+]
|
replace
`B' = `B' - (`L'/`g')*((`et'*`t')-(`et0'*$EREGt0))
|
|
base/g/gomper_p.ado:
|
128 [+]
|
gen
`vtyp' `varn'=(1/`gamma')* /*
*/ (ln(exp(`xb') + ln(2)*`gamma') - `xb')
if `touse'
|
|
base/g/gompertz.ado:
|
144 [+]
|
gen
double `den' = sum(`wvn'*(`t'-$EREGt0)*`touse')
|
|
base/g/gompertzhet.ado:
|
225 [+]
|
gen
double `den' = sum(`wvn'*(`t'-$EREGt0)*`touse')
|
|
base/g/gomphet_glf.ado:
|
81 [+]
|
replace
`c0' = cond(`t0'>0, /*
*/ (-`f0'+exp(`beta')*`th'*(`t0'*`t0'* /*
*/ exp(`ga'*`t0')- /*
*/ `t0'*exp(`ga'*`t0')/`ga' + (exp(`ga'*`t0')-1)/ /*
*/ (`ga'*`ga')))/`ga',0)
|
|
base/g/gomphet_glf_sh.ado:
|
31 [+]
|
gen
double `logs' = exp(`beta')/`gam'* /*
*/ (`expgt0' - `expgt')
if $ML_samp
|
|
base/g/gomphet_ilf.ado:
|
41 [+]
|
gen
double `f' = (2*`th'*exp(`beta')*`t'* /*
*/ exp(`ga'*`t')-`b')/`ga'
if $ML_samp
|
|
:
|
43 [+]
|
gen
double `f0' = cond(`t0'>0,(2*`th'*exp(`beta')*`t0'* /*
*/ exp(`ga'*`t0')-`b0')/`ga',0)
if $ML_samp
|
|
base/g/gomphet_ilf_sh.ado:
|
32 [+]
|
gen
double `logs' = exp(`beta')/`gam'* /*
*/ (`expgt0' - `expgt')
if $ML_samp
|
|
:
|
128 [+]
|
replace
`dz' = cond(`sumd'<., /*
*/ -(1/`c' - 1)*`ith'^2 + /*
*/ `c'*`sums'*(`a'*`sums' - `ith') , 0) /*
*/
if $ML_samp
|
|
base/g/gomphet_ip.ado:
|
175 [+]
|
qui
gen
double `ff'= `kk'/sqrt(1+2*`theta'/`gamma'* /*
*/ (`kk'-exp(`xb')))
if `touse'
|
|
base/g/gsem.ado:
|
31 [+]
|
capture
drop
`GSEM'*
All properties
| key |
content |
| command |
drop |
| indent |
1 |
| parameters |
`GSEM'* |
| prefix |
capture |
|
|
base/g/gsem_p.ado:
|
8 [+]
|
capture
drop
`tname'*
All properties
| key |
content |
| command |
drop |
| indent |
1 |
| parameters |
`tname'* |
| prefix |
capture |
|
|
base/g/gsem_parse.ado:
|
256 [+]
|
capture
drop
`GSEM'*
All properties
| key |
content |
| command |
drop |
| indent |
1 |
| parameters |
`GSEM'* |
| prefix |
capture |
|
|
base/h/hadimvo.ado:
|
144 [+]
|
replace
`D'=(`r'-1)*`D'/`cf'
All properties
| key |
content |
| command |
replace |
| indent |
2 |
| parameters |
`D'=(`r'-1)*`D'/`cf' |
|
|
:
|
169 [+]
|
replace
`D'=(`r'-1)*`D'/`cf'
All properties
| key |
content |
| command |
replace |
| indent |
3 |
| parameters |
`D'=(`r'-1)*`D'/`cf' |
|
|
base/h/heck_d2.ado:
|
34 [+]
|
qui
gen
double `eta' = (`Is' + /*
*/ ($ML_y1-`Ir')*`rho'/`sig') / sqrt(1-`rho'^2)
|
|
:
|
59 [+]
|
qui
replace
`sc3' = /*
*/ cond(`y2',`M'*(`ym'*`rr'+`eta'*`rho'*`rr'^2)*`dlr',0)
|
|
base/h/heckma_p.ado:
|
209 [+]
|
label
var `varn' "E(`depname'*|Pr(`selname'))"
|
|
base/h/hereg.ado:
|
123 [+]
|
gen
`score' = (`Fakedv'-`predz')*`hess'
|
|
base/i/ipolate.ado:
|
61 [+]
|
by `touse' `by':
replace
`z'=`m'[_N]*`x'+`b'[_N] /*
*/
if `touse' & `ismiss'
|
|
:
|
72 [+]
|
by `touse' `by':
replace
`z'=`M'[_N]*`x'+`B'[_N] /*
*/
if `touse' & `ismiss'
|
|
base/i/ivpoisson.ado:
|
558 [+]
|
qui
replace
`normwt' = r(N)*`normwt'/r(sum)
|
|
base/i/ivregress.ado:
|
255 [+]
|
qui
replace
`normwt' = r(N)*`normwt'/r(sum)
if `touse'
|
|
base/i/ivregress_estat.ado:
|
1281 [+]
|
qui
replace
`normwt' = r(N)*`normwt' / r(sum)
|
|
base/k/kdensity.ado:
|
207 [+]
|
qui
replace
`m' = r(min)-`wwidth'+(_n-1)*`delta'
in 1/`n'
|
|
base/k/kdensity_7.ado:
|
128 [+]
|
qui
replace
`m' = r(min)-`wwidth'+(_n-1)*`delta'
in 1/`n'
|
|
:
|
178 [+]
|
qui
replace
`tden' = `tden'/(`ft'[_N]*`scale')
|
|
base/l/lfit.ado:
|
348 [+]
|
gen
double `qx' = cond(`m'==1, `dw'*`x'[1]/`w'[1],
cond((_n-1)*`dw'>=`w'[`m'-1],
`dw'*(`x'[`m']-`x'[`m'-1])/(`w'[`m']-`w'[`m'-1]),
(_n*`dw'-`w'[`m'-1])
+ `x'[`m'-1] ))
in 1/`group'
-
*(`x'[`m']-`x'[`m'-1])/(`w'[`m']-`w'[`m'-1])
gen double `qx' = cond(`m'==1, `dw'*`x'[1]/`w'[1],
cond((_n-1)*`dw'>=`w'[`m'-1],
`dw'*(`x'[`m']-`x'[`m'-1])/(`w'[`m']-`w'[`m'-1]),
(_n*`dw'-`w'[`m'-1])
+ `x'[`m'-1] ))
in 1/`group'
|
|
:
|
355 [+]
|
replace
`qx' = `qx' - `x'[`m'[_n-1]]
+ cond(`m'[_n-1]==1,
(`w'[1]-(_n-1)*`dw')*`x'[1]/`w'[1],
(`w'[`m'[_n-1]]-(_n-1)*`dw')
/(`w'[`m'[_n-1]]-`w'[`m'[_n-1]-1]) )
in 2/`group'
if `m'>1 & (_n-1)*`dw'<`w'[`m'-1]
-
*(`x'[`m'[_n-1]]-`x'[`m'[_n-1]-1])
replace `qx' = `qx' - `x'[`m'[_n-1]]
+ cond(`m'[_n-1]==1,
(`w'[1]-(_n-1)*`dw')*`x'[1]/`w'[1],
(`w'[`m'[_n-1]]-(_n-1)*`dw')
/(`w'[`m'[_n-1]]-`w'[`m'[_n-1]-1]) )
in 2/`group'
if `m'>1 & (_n-1)*`dw'<`w'[`m'-1]
|
|
base/l/lloghet_glf.ado:
|
42 [+]
|
replace
`g3' = -`a'*`th'*exp(-`c')*`f' + /*
*/ (`c'-`c0')/`th' + exp(-`c0')*`f0'
|
|
:
|
45 [+]
|
replace
`b' = (`b'-1)*`ga'/`b'
All properties
| key |
content |
| command |
replace |
| indent |
2 |
| parameters |
`b' = (`b'-1)*`ga'/`b' |
|
|
:
|
46 [+]
|
replace
`b0' = cond(`t0'>0,(`b0'-1)*`ga'/`b0',0)
|
|
:
|
55 [+]
|
replace
`g2' = -`a'*`th'*exp(-`c')*`b' + exp(-`c0')*`b0' + /*
*/ `d'*(`ga'*(`beta'-ln(`t'))-1-`b')
|
|
:
|
68 [+]
|
gen
double `h' = -`b'*`ga'* /*
*/ (-`b'*(`t'*exp(-`beta'))^(-`ga')+1)
if $ML_samp
|
|
:
|
70 [+]
|
gen
double `h0' = cond(`t0'>0,-`b0'*`ga'* /*
*/ (-`b0'*(`t0'*exp(-`beta'))^(-`ga')+1),0)
if $ML_samp
|
|
base/l/lloghet_glf_sh.ado:
|
64 [+]
|
gen
double `logst' = `iga'*( (1-1/`F')*`lntmu' - /*
*/ (1-1/`F0')*`lntmu0' )
|
|
base/l/lloghet_ilf.ado:
|
54 [+]
|
replace
`g1' = `ga'*(`f'*`c' - `f0'*`c0' + `d'* /*
*/ (`f'*(1+`th'*`c'*`c') - 1))
|
|
:
|
61 [+]
|
replace
`g2' = (`h0'*`c0' - `h'*`c')/`ga' - `d'* /*
*/ (1 + ln(`t')*`ga' - `beta'*`ga' + `h'/`ga'* /*
*/ (`th'*`c'*`c'+1))
|
|
base/l/lloghet_ilf_sh.ado:
|
67 [+]
|
gen
double `logst' = `iga'*((1-1/`F')*`lntmu' - /*
*/ (1-1/`F0')*`lntmu0' )
|
|
:
|
144 [+]
|
replace
`dz' = cond(`sumd'<., /*
*/ -(1/`c' - 1)*`ith'^2 + /*
*/ `c'*`sums'*(`a'*`sums' - `ith') , 0) /*
*/
if $ML_samp
|
|
base/l/lloghet_ip.ado:
|
137 [+]
|
gen
`vtyp' `varn'=exp(`xb')*`cc'
if `touse'
|
|
base/l/lnorm_lf.ado:
|
40 [+]
|
qui
replace
`w1'=`d'*( (1/`es')*`lntxb' - `R'/`es') /*
*/ + `R'/`es' - cond(`t0'>0, `R0'/`es', 0)
|
|
:
|
58 [+]
|
gen
double `f'=`d'*( (-1/`e2s') /*
*/ -(1/`e2s')*((`lntxb')*`net'*`et' /*
*/ -`net'*`net' )/(`et'*`et') ) /*
*/ +(1/`e2s')*((`lntxb')*`net'*`et' /*
*/ -`net'*`net' )/(`et'*`et')
|
|
:
|
70 [+]
|
replace
`f'=`d'*((-2/`es')*`lntxb' /*
*/ -(1/`es')* ( -`R'+ ((`lntxb'^2)*`net'*`et' /*
*/ -`net'*`net'*`lntxb')/(`et'*`et')) ) /*
*/ +(1/`es')* ( -`R'+ ((`lntxb'^2)*`net'*`et' /*
*/ -`net'*`net'*`lntxb')/(`et'*`et'))
|
|
:
|
76 [+]
|
replace
`f'=`f'-(1/`es')* ( -`R0'+ /*
*/ ((`lntxb0'^2)*`net0'*`et0' /*
*/ -`net0'*`net0'*`lntxb0')/(`et0'*`et0')) /*
*/
if `t0'>0
|
|
:
|
84 [+]
|
replace
`f'=`d'*( -2*(`lntxb'^2) /*
*/ -`lntxb'*( ( (`lntxb'^2)*`net'*`et' /*
*/ -`net'*`net'*`lntxb') /(`et'*`et')) /*
*/ +`lntxb'*`R' ) /*
*/ +`lntxb'*(( (`lntxb'^2)*`net'*`et' /*
*/ -`net'*`net'*`lntxb')/(`et'*`et')) /*
*/ -`lntxb'*`R'
|
|
:
|
91 [+]
|
replace
`f'=`f' /*
*/ -`lntxb0'*(((`lntxb0'^2)*`net0'*`et0' /*
*/ -`net0'*`net0'*`lntxb0') /(`et0'*`et0')) /*
*/ +`lntxb0'*`R0'
if `t0'>0
|
|
base/l/lnormhet_ilf.ado:
|
77 [+]
|
replace
`c' = `f'*(`c'-`th'*`h'*`h'*`f'*`f') - /*
*/ `d'*(-1+2*`th'*`th'*`h'*`h'*(`f'^4) + /*
*/ (1-`th'*`f'*`f')*`c')
|
|
base/l/lnormhet_ilf_sh.ado:
|
148 [+]
|
replace
`dz' = cond(`sumd'<., /*
*/ -(1/`c' - 1)*`ith'^2 + /*
*/ `c'*`sums'*(`a'*`sums' - `ith') , 0) /*
*/
if $ML_samp
|
|
base/l/logis_lf.ado:
|
33 [+]
|
qui
replace
`w1'=-(`d'*`g'-(1+`d')*`et'*`g'/(1+`et'))
|
|
:
|
40 [+]
|
qui
replace
`w2'=-(`d'*(`I'*`g' +1+`g'*log(`t')) /*
*/ -(1+`d')*`et'*(`I'+log(`t'))*`g'/(1+`et'))
|
|
:
|
42 [+]
|
qui
replace
`w2' =`w2' - `et0'*(`I'+log(`t0'))*`g'/(1+`et0') /*
*/
if `t0'> 0
|
|
:
|
71 [+]
|
qui
replace
`C'=`d'*`g'*(`xblnt') /*
*/ -(1+`d')*`et'*`g'*`xblnt'* /*
*/ ((`xblnt'*`g')+1+`et')/(1+`et')^2
|
|
base/l/logit_p.ado:
|
231 [+]
|
by `keep' `rhs':
gen
long `y'=cond(_n==_N, /*
*/ sum((`e(depvar)'!=0 & `e(depvar)'<.)*`w'), .)
|
|
:
|
258 [+]
|
replace
`s' = `m'*`p'*(1-`p')*`s'*`s'
if `keep'
|
|
base/l/logrank.ado:
|
258 [+]
|
gen
double `wi' = sum( `ni'*(`n'-`ni')*`cons' )
|
|
base/l/lowess.ado:
|
208 [+]
|
replace
`ys' = `ys'* r(mean)/`mean'
if `touse'
|
|
base/l/lowess_7.ado:
|
147 [+]
|
replace
`ys' = `ys'* r(mean)/`mean'
if `touse'
|
|
base/l/lpoly.ado:
|
284 [+]
|
qui
replace
`xgrid' = r(min) + (_n - 1)*`delta'
in 1/`n'
|
|
base/l/lpredict.ado:
|
89 [+]
|
by `keep' `rhs':
gen
long `y'=cond(_n==_N, /*
*/ sum((`l'!=0 & `l'!=.)*`w') ,.)
|
|
:
|
111 [+]
|
replace
`new'=`m'*`p'*(1-`p')*`rthat'*`rthat'
|
|
base/l/lsens_x.ado:
|
23 [+]
|
gen
double `sumy' = sum((`y'==0)*`w')
if `touse'
|
|
:
|
29 [+]
|
replace
`sumy' = sum((`y'!=0)*`w')
if `touse'
|
|
base/l/ltable.ado:
|
207 [+]
|
gen
`H' = 2*`fail'/((2-`fail')*`dI')
|
|
base/l/ltable_7.ado:
|
131 [+]
|
gen
`H' = 2*`fail'/((2-`fail')*`dI')
|
|
base/l/ltable_9.ado:
|
183 [+]
|
gen
`H' = 2*`fail'/((2-`fail')*`dI')
|
|
base/m/mdslong.ado:
|
363 [+]
|
gen
`j12' = cond(`j1'<`j2', (`j1'-1)*`n'+`j2', (`j2'-1)*`n'+`j1')
|
|
base/m/merge_10.ado:
|
198 [+]
|
qui
recode
`_merge'?* (1 .=0) (2/5=1)
All properties
| key |
content |
| command |
recode |
| indent |
3 |
| parameters |
`_merge'?* (1 .=0) (2/5=1) |
| prefix |
qui |
|
|
base/m/mfp_10.ado:
|
445 [+]
|
cap
drop
`stub`i''*
All properties
| key |
content |
| command |
drop |
| indent |
2 |
| parameters |
`stub`i''* |
| prefix |
cap |
|
|
base/m/mgarch_dvech_p.ado:
|
719 [+]
|
qui
predict
double `res'*
if `touse'
, residuals
|
|
base/m/mhodds.ado:
|
239 [+]
|
qui by `touse' `strata' `by':
gen
double `pt'= /*
*/ sum((`d'+`h')*`wt')
if `touse'
|
|
:
|
244 [+]
|
qui by `touse' `strata' `by':
gen
double `p1'= /*
*/ sum((`d'+`h')*`e'*`wt')
if `touse'
|
|
:
|
246 [+]
|
qui by `touse' `strata' `by':
gen
double `p2' = /*
*/ sum((`d'+`h')*`e'*`e'*`wt')
if `touse'
|
|
base/m/ml_5.ado:
|
401 [+]
|
gen
double `sumff' = sum(`ff'*$S_mlwgt)
|
|
:
|
623 [+]
|
qui
gen
double `fatS' = sum(`fmhi'*$S_mlwgt)
|
|
:
|
672 [+]
|
qui
replace
`fatS' = sum(`fmhi'*$S_mlwgt)
|
|
base/n/nbreg.ado:
|
543 [+]
|
qui
replace
`z' = lngamma(`y'+exp(`z')) - lngamma(`y'+1) /*
*/ - lngamma(exp(`z')) + `lndelta'*`y' - (`y'+exp(`z'))*`lnoned' `if'
|
|
base/n/nbreg_al.ado:
|
45 [+]
|
qui
replace
`g2' = `y' - (`y'+`m')*`delta'/(1+`delta') - `g1' /*
*/
if $ML_samp
|
|
base/n/newey.ado:
|
165 [+]
|
replace
`vt1' = `x'*`e'* /*
*/ l`j'.`e'*l`j'.`wvar'* /*
*/ `ow'
if `touse'
|
|
base/n/newey_7.ado:
|
116 [+]
|
replace
`vt1' = `x'[_n-`j']*`e'* /*
*/ `e'[_n-`j']*`wvar'[_n-`j']* /*
*/ `ow'
if `touse'
|
|
base/n/nl_p.ado:
|
211 [+]
|
qui
replace
`varlist' = `plow'*`lb' + /*
*/ (1-`plow')*`e' /*
*/ if !mi(`lb') & mi(`ub') & `touse'
|
|
:
|
214 [+]
|
qui
replace
`varlist' = `pmid'*`e' + /*
*/ (1-`pmid')*`ub' /*
*/ if mi(`lb') & !mi(`ub') & `touse'
|
|
:
|
217 [+]
|
qui
replace
`varlist' = `plow' * `lb' + /*
*/ `pmid'*`e' + (1-`plow'-`pmid')*`ub' /*
*/ if !mi(`lb') & !mi(`ub') & `touse'
|
|
base/n/nlog_rd.ado:
|
110 [+]
|
qui
replace
`di' = /*
*/ (${ML_y`m'} - `p`j''*${ML_y`k'})
if `touse'
|
|
:
|
223 [+]
|
qui
replace
`ck' = cond($ML_y1,`Ij'* ///
(cond(${ML_y`l2'}==`jlev',1,0)+`dldtj'),0)
-
qui replace `ck' = cond($ML_y1,`Ij'* ///
(cond(${ML_y`l2'}==`jlev',1,0)+`dldtj'),0)
|
|
base/n/nlsur.ado:
|
493 [+]
|
qui
replace
`normwt' = r(N)*`normwt'/r(sum)
|
|
base/o/orthog.ado:
|
72 [+]
|
replace
`x`j'' = `x`j'' - r(mean)*`x`i''
|
|
:
|
100 [+]
|
replace
`x`j'' = `x`j'' - r(mean)*`x`i''
|
|
base/o/orthpoly.ado:
|
66 [+]
|
gen
double `q`i'' = (`a'*`x' + `b')*`q`j'' /*
*/ - `c'*`q`k''
if `doit'
|
|
base/p/probit_p.ado:
|
180 [+]
|
by `keep' `uorhs':
gen
long `y'=cond(_n==_N, /*
*/ sum((`e(depvar)'!=0 & `e(depvar)'<.)*`w'), .)
|
|
base/q/qreg_c.ado:
|
32 [+]
|
qui
replace
`r'=cond(`r'>=0,`quant',`quant'-1)*`r'
|
|
base/q/quantile.ado:
|
25 [+]
|
gen
`LINE'=`QUANT'[1] + `CNT'* /*
*/ ((`QUANT'[`CNT'[_N]]-`QUANT'[1])/`CNT'[_N])
|
|
base/q/quantile_7.ado:
|
11 [+]
|
gen
`LINE'=`QUANT'[1] + `CNT'* /*
*/ ((`QUANT'[`CNT'[_N]]-`QUANT'[1])/`CNT'[_N])
|
|
base/r/regre_p2.ado:
|
126 [+]
|
replace
`Y' = `p'*`E' + (1-`p')*`lb' /*
*/
if `touse' & `lb'!=. & `ub'==.
|
|
:
|
128 [+]
|
replace
`Y' = `p'*`E' + (1-`p')*`ub' /*
*/
if `touse' & `lb'==. & `ub'!=.
|
|
:
|
130 [+]
|
replace
`Y' = `p'*`E' + `p2'*`lb' + (1-`p'-`p2')*`ub' /*
*/
if `touse' & `lb'!=. & `ub'!=.
|
|
base/r/regres_p.ado:
|
250 [+]
|
gen
`type' `newvar'=`RSTU'*`RES'/sqrt((1-`HAT')*`SRES'[_N])
|
|
base/r/rocreg_p.ado:
|
407 [+]
|
qui
replace
`intercept_`varit'' = ///
`bmat'[1,`icr']*`ivar'+
|
|
base/r/rocregstat.ado:
|
342 [+]
|
qui
gen
double `roc_`vvit''= ///
`eb'[1,`ic'] + ///
`eb'[1,`sc']*`lirc'
|
|
base/r/roctab.ado:
|
615 [+]
|
by `touse' `C':
gen
`row1' = sum(`touse'*(1-`D')*`wv')
|
|
:
|
628 [+]
|
gen
`row6' = `row3'*(`row4'*(`row4'+`row1')+(1/3)*`row1'^2)
if `touse'
|
|
:
|
631 [+]
|
gen
`row7' = `row1'*(`row2'*(`row2'+`row3')+(1/3)*`row3'^2)
if `touse'
|
|
base/r/roctab_7.ado:
|
499 [+]
|
by `touse' `C':
gen
`row1' = sum(`touse'*(1-`D')*`wv')
|
|
:
|
512 [+]
|
gen
`row6' = `row3'*(`row4'*(`row4'+`row1')+(1/3)*`row1'^2)
if `touse'
|
|
:
|
515 [+]
|
gen
`row7' = `row1'*(`row2'*(`row2'+`row3')+(1/3)*`row3'^2)
if `touse'
|
|
base/r/rologit_p.ado:
|
94 [+]
|
gen
`vtyp' `varn' = `p'*(1-`p')*`b'
if `touse'
|
|
base/r/rreg.ado:
|
182 [+]
|
replace
`y'= `y' + /*
*/ (`lambda'*`scale'/`aa')*(`res'/`scale')*`weight' /*
*/
if `touse'
|
|
base/s/sample.ado:
|
89 [+]
|
by `by':
replace
`N'=int(`N'[_N]*`exp'/100+.5)
|
|
base/s/sem.ado:
|
81 [+]
|
capture
drop
`SEM'*
All properties
| key |
content |
| command |
drop |
| indent |
2 |
| parameters |
`SEM'* |
| prefix |
capture |
|
|
base/s/slogit_d2.ado:
|
31 [+]
|
replace
`p`i'' = `p`i'' - el(`phi`dm'',1,`i')*`xb`dm''
|
|
base/s/stmh.ado:
|
193 [+]
|
by `str' `by':
gen
double `d1' = /*
*/ sum(`wt'*_d *`e')
|
|
:
|
204 [+]
|
gen
double `d1' = sum(`wt'*_d *`e')
|
|
base/s/stphtest.ado:
|
229 [+]
|
gen
double `wrk' = sum(cond(e(sample), /*
*/ (`rnk'-`rvar')*``i'', 0))
|
|
:
|
265 [+]
|
gen
double `gnum' = sum(cond(e(sample), /*
*/ (`rnk'-`rvar')*``i'',0))
|
|
base/s/stphtest_7.ado:
|
205 [+]
|
gen
double `wrk' = sum(cond(e(sample), /*
*/ (`rnk'-`rvar')*``i'', 0))
|
|
:
|
241 [+]
|
gen
double `gnum' = sum(cond(e(sample), /*
*/ (`rnk'-`rvar')*``i'',0))
|
|
base/s/suest.ado:
|
184 [+]
|
capture
predict
double `sci'*
if `esamp'
, score
|
|
base/s/svygen.ado:
|
78 [+]
|
quietly by `by' :
replace
`wgt' = (_n==1)*`postwt'
|
|
base/s/svytab.ado:
|
771 [+]
|
gen
double `x' = ($S_VYexp)*`y'
|
|
:
|
1438 [+]
|
gen
double `xc' = e(total)*`bij'
in 1/`ncat'
|
|
:
|
1441 [+]
|
replace
`xc' = e(total)*`matr'[1,_n-`Nr1'+1] /*
*/
in `Nr1'/`Nr2'
|
|
:
|
1443 [+]
|
replace
`xc' = e(total)*`matc'[1,_n-`Nc1'+1] /*
*/
in `Nc1'/`Nc2'
|
|
:
|
1527 [+]
|
replace
`xse' = `porp'* /*
*/ sqrt(`V'[_n-`Nr1'+1, /*
*/ _n-`Nr1'+1])
in `Nr1'/`Nr2'
|
|
:
|
1533 [+]
|
replace
`xse' = `porp'* /*
*/ sqrt(`V'[_n-`Nc1'+1, /*
*/ _n-`Nc1'+1])
in `Nc1'/`Nc2'
|
|
base/s/svytab_7.ado:
|
759 [+]
|
gen
double `x' = ($S_VYexp)*`y'
|
|
:
|
1349 [+]
|
gen
double `xc' = e(total)*`bij'
in 1/`ncat'
|
|
:
|
1352 [+]
|
replace
`xc' = e(total)*`matr'[1,_n-`Nr1'+1] /*
*/
in `Nr1'/`Nr2'
|
|
:
|
1354 [+]
|
replace
`xc' = e(total)*`matc'[1,_n-`Nc1'+1] /*
*/
in `Nc1'/`Nc2'
|
|
:
|
1436 [+]
|
replace
`xse' = `porp'* /*
*/ sqrt(`V'[_n-`Nr1'+1, /*
*/ _n-`Nr1'+1])
in `Nr1'/`Nr2'
|
|
:
|
1442 [+]
|
replace
`xse' = `porp'* /*
*/ sqrt(`V'[_n-`Nc1'+1, /*
*/ _n-`Nc1'+1])
in `Nc1'/`Nc2'
|
|
base/t/tnbreg.ado:
|
650 [+]
|
qui
replace
`z' = lngamma(`y'+exp(`z')) - lngamma(`y'+1) /*
*/ - lngamma(exp(`z')) + `lndelta'*`y' - (`y'+exp(`z'))*`lnoned' /*
*/ - ln(nbinomialtail(exp(`z'),$ztnb_tp+1,(1+exp(`mudelta')) )) `if'
|
|
base/t/tnbreg_cons.ado:
|
114 [+]
|
qui
gen
double `f2' = `y' -(`y'+`m')*`delta'/
All properties
| key |
content |
| command |
gen |
| comment |
///
(1+`delta') - `z2' if $ML_samp |
| indent |
2 |
| parameters |
double `f2' = `y' -(`y'+`m')*`delta'/ |
| prefix |
qui |
|
|
base/t/tnbreg_mean.ado:
|
160 [+]
|
qui
gen
double `z3' = cond($ML_samp & `tp'==0, ///
-`p'^(`m'+1)*`mu'/ `z2', ///
cond($ML_samp & `tp'>0, ///
-(`x3'-`x2')/(2*`h2'), .))
-
qui gen double `z3' = cond($ML_samp & `tp'==0, ///
-`p'^(`m'+1)*`mu'/ `z2', ///
cond($ML_samp & `tp'>0, ///
-(`x3'-`x2')/(2*`h2'), .))
|
|
base/t/treatr_p.ado:
|
157 [+]
|
gen
`vtyp' `varn' = `Xb'- `trtname'*[`depname']_b[`trtname'] /*
*/ + [`depname']_b[`trtname'] + (normd(`Xbprb') / /*
*/ normprob(`Xbprb')) * `sigma' * `rho'
|
|
:
|
166 [+]
|
gen
`vtyp' `varn' = `Xb'- `trtname'*[`depname']_b[`trtname'] /*
*/ - (normd(`Xbprb')/normprob(-`Xbprb')) /*
*/ * `sigma' * `rho'
|
|
base/t/trnb_cons.ado:
|
48 [+]
|
qui
replace
`g1' = `z2'-(1+`delta')^(-`m')*`lnoned'*`m' /*
*/ / `z3'
if $ML_samp
|
|
:
|
51 [+]
|
qui
replace
`g2' = `y' -(`y'+`m')*`delta'/(1+`delta') - `z2' /*
*/ + (1+ `delta')^(-`m')*(`m'*ln(1+`delta') /*
*/ -`mu'/(1+`delta') )/ `z3'
if $ML_samp
|
|
base/t/trnb_mean.ado:
|
45 [+]
|
replace
`sc1' = `p'*(`y'-`mu') - /*
*/ `p'^(`m'+1)*`mu'/ `z2'
if $ML_samp
|
|
base/u/u_mi_impute_fv2var.ado:
|
11 [+]
|
cap
drop
`fvstub'*
All properties
| key |
content |
| command |
drop |
| indent |
2 |
| parameters |
`fvstub'* |
| prefix |
cap |
|
|
base/w/weib1_lf.ado:
|
38 [+]
|
replace
`g2' = /*
*/ `p'*(((`xb'-`lnt')*`eplnt' - (`xb'-`lnt0')*`eplnt0') /*
*/ + `d'*((`lnt'-`xb' + 1/`p')))
|
|
base/w/weibhet_glfa.ado:
|
25 [+]
|
gen
double `b' = exp(-`beta'*`p')*`t'^`p'
if $ML_samp
|
|
:
|
26 [+]
|
gen
double `b0' = cond(`t0'>0, exp(-`beta'*`p')*`t0'^`p',0) /*
*/
if $ML_samp
|
|
base/w/weibhet_gp.ado:
|
180 [+]
|
qui
gen
double `kk' = exp(`xb')*`t'^(`auxp'-1) /*
*/
if `touse'
|
|
:
|
195 [+]
|
qui
gen
double `ff'= 1+`theta'*exp(`xb')*`t'^`auxp' /*
*/
if `touse'
|
|
:
|
197 [+]
|
qui
gen
double `ff0'= 1+`theta'*exp(`xb')*`t0'^`auxp' /*
*/
if `t0'>0 & `touse'
|
|
:
|
226 [+]
|
qui
gen
double `ff'= /*
*/ (`d'!=0)-(1/`theta')* /*
*/ ln(1+`theta'*exp(`xb')*`t'^`auxp')
if `touse'
|
|
:
|
229 [+]
|
qui
replace
/*
*/ `ff'=`ff'+(1/`theta')* /*
*/ ln(1+`theta'*exp(`xb')*`t0'^`auxp') /*
*/
if `t0'>0 & `touse'
|
|
base/w/weibhet_ilf.ado:
|
26 [+]
|
gen
double `b' = exp(`beta')*`t'^`p'
if $ML_samp
|
|
:
|
27 [+]
|
gen
double `b0' = cond(`t0'>0, exp(`beta')*`t0'^`p',0) /*
*/
if $ML_samp
|
|
:
|
41 [+]
|
replace
`g1' = -`f' + `f0' + `d'* /*
*/ (1 - `th'*`f'/`c')
All properties
| key |
content |
| command |
replace |
| indent |
2 |
| parameters |
`g1' = -`f' + `f0' + `d'* /*
*/ (1 - `th'*`f'/`c') |
|
|
:
|
43 [+]
|
replace
`g2' = (-`f'*`lnt' + `f0'*`lnt0' + `d'*`lnt'* /*
*/ (1-`th'*`f'/`c'))*`p' + `d'
|
|
base/w/weibhet_ilf_sh.ado:
|
128 [+]
|
replace
`dz' = cond(`sumd'!=., /*
*/ -(1/`c' - 1)*`ith'^2 + /*
*/ `c'*`sums'*(`a'*`sums' - `ith') , 0) /*
*/
if $ML_samp
|
|
base/w/weibhet_ilfa_sh.ado:
|
136 [+]
|
replace
`dz' = cond(`sumd'!=., /*
*/ -(1/`c' - 1)*`ith'^2 + /*
*/ `c'*`sums'*(`a'*`sums' - `ith') , 0) /*
*/
if $ML_samp
|
|
base/w/weibhet_ip.ado:
|
183 [+]
|
qui
gen
double `kk' = exp(`xb')*`t'^(`auxp'-1)
if `touse'
|
|
:
|
197 [+]
|
qui
gen
double `ff'= 1+2*`theta'*exp(`xb')*`t'^`auxp' /*
*/
if `touse'
|
|
:
|
199 [+]
|
qui
gen
double `ff0'= 1+2*`theta'*exp(`xb')*`t0'^`auxp' /*
*/
if `t0'>0 & `touse'
|
|
:
|
228 [+]
|
qui
gen
double `ff'= /*
*/ (`d'!=0)+(1/`theta')* /*
*/ (1-sqrt(1+2*`theta'*exp(`xb')*`t'^`auxp'))
if `touse'
|
|
:
|
231 [+]
|
qui
replace
/*
*/ `ff'=`ff'-(1/`theta')* /*
*/ (1-sqrt(1+2*`theta'*exp(`xb')*`t0'^`auxp')) /*
*/
if `t0'>0 & `touse'
|
|
base/w/weibul_p.ado:
|
237 [+]
|
gen
`vtyp' `varn' = /*
*/ exp( -exp(`rgn'*`xb')* `t'^`aux_p' ) / /*
*/ exp( -exp(`rgn'*`xb')*`t0'^`aux_p' )
if `touse'
|
|
base/w/wntestb_7.ado:
|
297 [+]
|
gen
int `mapy' = ($S_GPH_ay)*`y' + ($S_GPH_by)
|
|
:
|
298 [+]
|
gen
int `mapx' = ($S_GPH_ax)*`x' + ($S_GPH_bx)
|
|
:
|
315 [+]
|
gen
int `mapy1'=($S_GPH_ay)*`inarg' + ($S_GPH_by)
|
|
:
|
317 [+]
|
gen
int `mapx1'=($S_GPH_ax)*`inarg' + ($S_GPH_bx)
|
|
:
|
333 [+]
|
replace
`mapy2'=($S_GPH_ay)*`inarg' + ($S_GPH_by)
|
|
:
|
336 [+]
|
replace
`mapx2'=($S_GPH_ax)*`inarg' + ($S_GPH_bx)
|
|
:
|
396 [+]
|
gen
int `mapy' = ($S_GPH_ay)*`y' + ($S_GPH_by)
|
|
:
|
397 [+]
|
gen
int `mapx' = ($S_GPH_ax)*`x' + ($S_GPH_bx)
|
|
:
|
489 [+]
|
gen
int `mapy' = ($S_GPH_ay)*`y' + ($S_GPH_by)
|
|
:
|
490 [+]
|
gen
int `mapx' = ($S_GPH_ax)*`x' + ($S_GPH_bx)
|
|
base/x/xi.ado:
|
423 [+]
|
label
var `stub'`num1' "(`lbl1')*`part2'"
|
|
base/x/xi_6.ado:
|
215 [+]
|
label
var `stub'`num1' "(`lbl1')*`part2'"
|
|
base/x/xtcloglog.ado:
|
420 [+]
|
gen
double `logFc' = log((`sn'==1) -`sn'* exp(-exp(`xb')))
if `touse'
|
|
base/x/xtgee.ado:
|
1564 [+]
|
replace
`dj' = 2*(`y'*ln(`y'/`mu')-(1+`k'*`y')/`k'* /*
*/ ln((1+`k'*`y')/(1+`k'*`mu')))
if `y'
|
|
:
|
1666 [+]
|
replace
`dj' = 2*(`y'*ln(`y'/`mu')-(1+`k'*`y')/`k'* /*
*/ ln((1+`k'*`y')/(1+`k'*`mu')))
if `y'
|
|
base/x/xtgee_p.ado:
|
229 [+]
|
qui
replace
`xb' = (`e(power)'*`xb'+1)^(1/`e(power)') /*
*/
if `touse'
|
|
base/x/xtgee_plink.ado:
|
42 [+]
|
replace
`m' = (`m'/`N'*.9999)*`N'
All properties
| key |
content |
| command |
replace |
| indent |
3 |
| parameters |
`m' = (`m'/`N'*.9999)*`N' |
|
|
base/x/xtgls.ado:
|
681 [+]
|
gen
double ${X_ee}`i' = $X_ee[`b0'+_n]
in 1/$X_nt
|
|
base/x/xtregar.ado:
|
308 [+]
|
qui by `id':
gen
`tvar'=(sqrt(1-`rho'^2))*`x'
if _n==1
|
|
:
|
554 [+]
|
replace
`g_i'=sqrt(1-`rho'^2)*`g_i'
|
|
:
|
1143 [+]
|
by `id':
gen
double `zresLD'=(`zres'-`zres'[_n-1]*`Itj')^2
|
|
base/x/xtsf_ll.ado:
|
76 [+]
|
gen
double `denom' = sqrt(`gamma'*(1-`gamma')*`sigmaS2' /*
*/ *(1+(`eta2'-1)*`gamma'))
if $ML_samp
|
|
:
|
83 [+]
|
gen
double `f' = -1/2*`T'*(ln(2*_pi)+ln(`sigmaS2')) /*
*/ - 1/2*(`T'-1)*ln(1-`gamma') /*
*/ - 1/2*ln(1+(`eta2'-1)*`gamma') /*
*/ - ln(normprob(`z')) - 1/2*`z'^2 /*
*/ + ln(normprob(`zi')) /*
*/ + 1/2*`zi'^2 /*
*/ - 1/2*(`e2'/((1-`gamma')*`sigmaS2'))
|
|
:
|
143 [+]
|
gen
double `dne' = /*
*/ `sigmaS2'*(`gamma'-`gamma'^2)*`gamma'*`deta2'
|
|
:
|
151 [+]
|
gen
double `dzgamma' = -(`mu'+$S_COST*`eta_e')/`denom' /*
*/ - 0.5*(`mu'*(1-`gamma')-$S_COST*`gamma'*`eta_e') /*
*/ *`dng'/(`denom'^3)
|
|
:
|
157 [+]
|
gen
double `dzeta' = -$S_COST*`gamma'*`deta_e'/`denom' /*
*/ - (`mu'*(1-`gamma')-$S_COST*`gamma'*`eta_e')*0.5 /*
*/ *`dne'/`denom'^3
|
|
base/x/xtsf_llti.ado:
|
71 [+]
|
gen
double `denom' = sqrt(`gamma'*(1-`gamma')*`sigmaS2' /*
*/ *(1+(`eta2'-1)*`gamma'))
if $ML_samp
|
|
:
|
78 [+]
|
gen
double `f' = -1/2*`T'*(ln(2*_pi)+ln(`sigmaS2')) /*
*/ - 1/2*(`T'-1)*ln(1-`gamma') /*
*/ - 1/2*ln(1+(`eta2'-1)*`gamma') /*
*/ - ln(normprob(`z')) - 1/2*`z'^2 /*
*/ + ln(normprob(`zi')) /*
*/ + 1/2*`zi'^2 /*
*/ - 1/2*(`e2'/((1-`gamma')*`sigmaS2'))
if $ML_samp
|
|
:
|
131 [+]
|
gen
double `dzgamma' = -(`mu'+$S_COST*`eta_e')/`denom' /*
*/ - 0.5*(`mu'*(1-`gamma')-$S_COST*`gamma'*`eta_e') /*
*/ *`dng'/(`denom'^3)
|
|
base/z/zinb_llf.ado:
|
39 [+]
|
qui
gen
double `fz' = exp(`zg')*`f1'*`f1'
if $ML_samp
|
|
:
|
71 [+]
|
qui
replace
`ttt' = cond(`y' == 0,
(-`f1'*`mu'*`p'^(`m'+1)*
(`alpha'*`mu'*(`m'+1)*`p'-1))/`f2' +
`sc1'*`sc1',
`alpha'*`mu'*`p'^2*(`y'-`mu')+`mu'*`p' )
if $ML_samp
|
|
:
|
84 [+]
|
qui
replace
`ttt' = cond(`y' == 0,
(-`f1'*`mu'*`p'^(`m'+1)*((`m'+1)*`mu'*`p'+
`m'*`m'*ln(`p')))/`f2' +
`f1'*`f1'*`mu'*`p'^(2*`m'+1)*(`m'*`mu'*`p'+
`m'*`m'*ln(`p'))/(`f2'*`f2'),
`mu'*`p'^2*(`y'-`mu') )
if $ML_samp
-
qui replace `ttt' = cond(`y' == 0,
(-`f1'*`mu'*`p'^(`m'+1)*((`m'+1)*`mu'*`p'+
`m'*`m'*ln(`p')))/`f2' +
`f1'*`f1'*`mu'*`p'^(2*`m'+1)*(`m'*`mu'*`p'+
`m'*`m'*ln(`p'))/(`f2'*`f2'),
`mu'*`p'^2*(`y'-`mu') ) if $ML_samp
|
|
:
|
93 [+]
|
qui
replace
`ttt' = cond(`y' == 0 ,
-(1-exp(`zg'))*`f1'*`fz'*(1-`p'^`m') / `f2' +
(`fz'*(1-`p'^`m') / `f2')^2 ,
(1-exp(`zg'))*`f1'*`fz'/`f1' + (`fz'/`f1')^2)
if $ML_samp
|
|
:
|
99 [+]
|
qui
replace
`ttt' = cond(`y' == 0,
-`fz'/`f2'*(1+(1-`p'^`m')*`f1'/`f2')*
`p'^`m'*(`m'*`m'*ln(`p')+`m'*`mu'*`p'),
0 )
if $ML_samp
|
|
base/z/zinb_plf.ado:
|
70 [+]
|
qui
replace
`ttt' = cond(`y' == 0,
(-`f1'*`mu'*`p'^(`m'+1)*
(`alpha'*`mu'*(`m'+1)*`p'-1))/`f2' +
`sc1'*`sc1',
`alpha'*`mu'*`p'^2*(`y'-`mu')+`mu'*`p' )
if $ML_samp
|
|
:
|
77 [+]
|
qui
replace
`ttt' = cond(`y' == 0,
-normd(`zg')*`mu'*`p'^(`m'+1) / `f2' -
`f1'*`mu'*`p'^(`m'+1)*normd(`zg')*(1-`p'^`m') / (`f2'*`f2') ,
0 )
if $ML_samp
|
|
:
|
83 [+]
|
qui
replace
`ttt' = cond(`y' == 0,
(-`f1'*`mu'*`p'^(`m'+1)*((`m'+1)*`mu'*`p'+
`m'*`m'*ln(`p')))/`f2' +
`f1'*`f1'*`mu'*`p'^(2*`m'+1)*(`m'*`mu'*`p'+
`m'*`m'*ln(`p'))/(`f2'*`f2'),
`mu'*`p'^2*(`y'-`mu') )
if $ML_samp
-
qui replace `ttt' = cond(`y' == 0,
(-`f1'*`mu'*`p'^(`m'+1)*((`m'+1)*`mu'*`p'+
`m'*`m'*ln(`p')))/`f2' +
`f1'*`f1'*`mu'*`p'^(2*`m'+1)*(`m'*`mu'*`p'+
`m'*`m'*ln(`p'))/(`f2'*`f2'),
`mu'*`p'^2*(`y'-`mu') ) if $ML_samp
|
|
:
|
98 [+]
|
qui
replace
`ttt' = cond(`y' == 0,
-normd(`zg')/`f2'*(1+(1-`p'^`m')*`f1'/`f2')*
`p'^`m'*(`m'*`m'*ln(`p')+`m'*`mu'*`p'),
0 )
if $ML_samp
|
|
base/z/zip.ado:
|
375 [+]
|
replace
`prhat'=(1-`psihat')*(exp(-1*`muhat') /*
*/ *`muhat'^`dep')/exp(lnfact(`dep')) /*
*/
if `dep'>0 & `dep'<. & `touse'
|
|
base/z/zip_llf.ado:
|
27 [+]
|
qui
gen
double `fz' = exp(`zg')*`f1'*`f1'
if $ML_samp
|
|
:
|
58 [+]
|
qui
replace
`ttt' = cond($ML_y1 == 0,
-`fz'*`lambda'*exp(-`lambda') / `f2' -
`fz'*(1-exp(-`lambda'))*`f1'*
`lambda'*exp(-`lambda') / `f2'^2,
0)
if $ML_samp
|
|
:
|
66 [+]
|
qui
replace
`ttt' = cond($ML_y1 == 0 ,
-(1-exp(`zg'))*`f1'*`fz'*(1-exp(-`lambda')) / `f2' +
(`fz'*(1-exp(-`lambda')) / `f2')^2 ,
(1-exp(`zg'))*`f1'*`fz'/`f1' + (`fz'/`f1')^2)
if $ML_samp
|
|
base/z/zip_plf.ado:
|
58 [+]
|
qui
replace
`ttt' = cond($ML_y1 == 0,
-normd(`zg')*`lambda'*exp(-`lambda') / `f2' -
normd(`zg')*(1-exp(-`lambda'))*`f1'*
`lambda'*exp(-`lambda') / `f2'^2,
0)
if $ML_samp
|
|
base/z/ztnb.ado:
|
501 [+]
|
qui
replace
`z' = lngamma(`y'+exp(`z')) - lngamma(`y'+1) /*
*/ - lngamma(exp(`z')) + `lndelta'*`y' - (`y'+exp(`z'))*`lnoned' /*
*/ - ln(1-(1+exp(-`lndelta'*`mudelta'))) `if'
|
-
-
Script Output
change: Closing price change Number of Observations
----------------------------- ------------------------------
Total Integers Nonintegers
| # Negative 128 3 125
| # Zero - - -
| # Positive 119 - 119
| # # ----- ----- -----
| # # Total 247 3 244
| . # # # . Missing 1
+---------------------- -----
-53.77002 64.29004 248
(More than 99 unique values)
Variable | Obs Mean Std. Dev. Min Max
-------------+--------------------------------------------------------
change | 247 -.5473282 15.84464 -53.77002 64.29004
@mean -0.547
@sd 15.845
@min -53.770
@max 64.290
@example0 .
@histh .00102878, .00051439, .00205755, .00565827, .01388849, .01697482, .02983454, .02674821, .01646043, .00925899, .00205755, .00102878, .00102878, .00051439
@histw -49.834682, -41.964012, -34.093342, -26.222673, -18.352001, -10.481332, -2.6106608, 5.2600098, 13.13068, 21.00135, 28.872021, 36.742691, 44.613361, 60.354702
@type float
@label Closing price change
@class other
@N_unique .
@N 247
|
[+]
close
@sp500.dta |
|
other
(float)
|
248
(.)
|
(x̄=1194.179, 86.795) [965.800,1373.730] |
Closing price
|
All properties
| key |
content |
| N |
248 |
| N_unique |
. |
| class |
other |
| example0 |
1283.27 |
| histh |
.00029654, .00074135, .00059308, .0014827, .00222405, .00237232, .00563427, .0040033, .00341022, .0040033, .00429984, .00252059, .00177924, .0014827, .00192751 |
| histw |
979.39764, 1006.593, 1033.7883, 1060.9836, 1088.179, 1115.3743, 1142.5697, 1169.765, 1196.9603, 1224.1556, 1251.351, 1278.5463, 1305.7417, 1332.937, 1360.1323 |
| label |
Closing price |
| max |
1373.730 |
| mean |
1194.179 |
| min |
965.800 |
| sd |
86.795 |
| type |
float |
Data Manipulations with close
| file |
# |
command |
|
base/a/arch.ado:
|
552 [+]
|
qui
gen
double `wt_e2' = .7^(`timevar'-r(tmin))*$Te2 /*
*/
if `touse'
|
|
:
|
1131 [+]
|
qui
gen
double $Te_tarch = ($Te > 0)*$Te2
|
|
base/a/arch_dr.ado:
|
86 [+]
|
qui
gen
double `wt_e2' = /*
*/ .7^($Ttimevar-$Ttimemin)*$Te2 /*
*/
if $ML_samp
|
|
:
|
208 [+]
|
qui
gen
double `wt_e2' = /*
*/ .7^($Ttimevar-$Ttimemin)*$Te2
if $ML_samp
|
|
base/b/boxcox_p.ado:
|
80 [+]
|
gen
`vtyp' `varn' = (e(L)*`xb'+1)^(1/e(L)) /*
*/
if `touse'
|
|
base/b/bsample.ado:
|
168 [+]
|
gen
`r' = int(uniform()*`nmax' + 1)
|
|
:
|
357 [+]
|
gen
double `r' = int(uniform()*`nclust' + 1)
in 1/`nclust'
|
|
:
|
539 [+]
|
by `strata' `clid' `obsid':
replace
`r' = (`clid'-1)*`nclust'+_n-1
|
|
:
|
574 [+]
|
by `strata' `clid' `obsid':
replace
`r' = (`clid'-1)*`nclust'+_n-1
|
|
base/b/bsample_7.ado:
|
99 [+]
|
gen
double `r' = int(uniform()*`nclust' + 1)
in 1/`nclust'
|
|
:
|
115 [+]
|
by `clid' `obsid':
replace
`r' = (`clid'-1)*`nclust'+_n-1
|
|
base/c/clogit.ado:
|
654 [+]
|
qui by `touse' `group':
gen
double `i' = (_n==1&`touse')*`freq'
|
|
base/c/cluster.ado:
|
2291 [+]
|
qui by `tousevar' :
gen
long `grpvar' = /*
*/ int(((_n-1)/_N)*`k') + 1
if `tousevar'
|
|
:
|
2391 [+]
|
qui
replace
`var'=uniform()*`vrange'+`vmin' /*
*/
in `Np1'/`newN'
|
|
base/c/cluster_tree_8.ado:
|
905 [+]
|
qui
gen
double `cind' = `lbuf' + (`ncols'-`rbuf'-`lbuf')*`atx'/`maxx' /*
*/
if `atx' < .
|
|
base/c/cusum.ado:
|
44 [+]
|
replace
`x' = `x'+uniform()*`jx'
-
/*
To avoid ties and ensure a unique sort order for x,
randomly jitter x by .00001 times its range using a fixed seed
Answer: No, setting the seed screws up Monte Carlo experiments.
*/
replace `x' = `x'+uniform()*`jx'
|
|
base/c/cusum_7.ado:
|
27 [+]
|
replace
`x' = `x'+uniform()*`jx'
-
/*
To avoid ties and ensure a unique sort order for x,
randomly jitter x by .00001 times its range using a fixed seed
Answer: No, setting the seed screws up Monte Carlo experiments.
*/
replace `x' = `x'+uniform()*`jx'
|
|
base/d/dfgls.ado:
|
126 [+]
|
gen
double `dty'=`varlist'-_b[`iota']-_b[`qdtrd']*`trd'
|
|
base/d/dvech_p.ado:
|
700 [+]
|
qui
predict
double `res'*
if `touse'
, residuals
|
|
base/e/ereg.ado:
|
172 [+]
|
gen
double `lnf' = `wv' * ///
(`d'*`cons'-exp(`cons')*`realt')
|
|
base/e/ereg_lf.ado:
|
13 [+]
|
quietly
replace
`g1' = $ML_y2-exp(`I')*$ML_y1
|
|
base/e/ereg_p.ado:
|
348 [+]
|
gen
`typlist' `varlist' = `minus'(`d'-exp(`minus'`I')*`t')
if `touse'
|
|
base/e/ereghet_glf.ado:
|
22 [+]
|
gen
double `b' = exp(`beta')*`t'
if $ML_samp
|
|
:
|
23 [+]
|
gen
double `b0' = cond(`t0'>0, exp(`beta')*`t0',0) /*
*/
if $ML_samp
|
|
base/e/ereghet_gp.ado:
|
206 [+]
|
qui
gen
double `ff'= 1+`theta'*exp(`xb')*`t'
if `touse'
|
|
:
|
207 [+]
|
qui
gen
double `ff0'= 1+`theta'*exp(`xb')*`t0' /*
*/
if `t0'>0 & `touse'
|
|
:
|
236 [+]
|
qui
gen
double `ff'= /*
*/ (`d'!=0)-(1/`theta')* /*
*/ ln(1+`theta'*exp(`xb')*`t')
if `touse'
|
|
:
|
239 [+]
|
qui
replace
/*
*/ `ff'=`ff'+(1/`theta')* /*
*/ ln(1+`theta'*exp(`xb')*`t0') /*
*/
if `t0'>0 & `touse'
|
|
base/e/ereghet_ilf.ado:
|
21 [+]
|
gen
double `b' = exp(`beta')*`t'
if $ML_samp
|
|
:
|
22 [+]
|
gen
double `b0' = cond(`t0'>0, exp(`beta')*`t0',0) /*
*/
if $ML_samp
|
|
:
|
53 [+]
|
gen
double `dt' = `th'*(`f'*`f'/`c' - cond(`t0'>0, /*
*/ `f0'*`f0'/`c0',0) - `d'*`f'/`c'* /*
*/ (1-2*`th'*`f'/`c'))
|
|
base/e/ereghet_ilf_sh.ado:
|
97 [+]
|
replace
`dz' = cond(`sumd'<., /*
*/ -(1/`c' - 1)*`ith'^2 + /*
*/ `c'*`sums'*(`a'*`sums' - `ith') , 0) /*
*/
if $ML_samp
|
|
base/e/ereghet_ip.ado:
|
206 [+]
|
qui
gen
double `ff'= 1+2*`theta'*exp(`xb')*`t'
if `touse'
|
|
:
|
207 [+]
|
qui
gen
double `ff0'= 1+2*`theta'*exp(`xb')*`t0' /*
*/
if `t0'>0 & `touse'
|
|
:
|
236 [+]
|
qui
gen
double `ff'= /*
*/ (`d'!=0)+(1/`theta')* /*
*/ (1-sqrt(1+2*`theta'*exp(`xb')*`t'))
if `touse'
|
|
:
|
239 [+]
|
qui
replace
/*
*/ `ff'=`ff'-(1/`theta')* /*
*/ (1-sqrt(1+2*`theta'*exp(`xb')*`t0')) /*
*/
if `t0'>0 & `touse'
|
|
base/e/etpoisson_p.ado:
|
111 [+]
|
gen
`typlist' `varlist' = ///
exp(((`sigma'^2)/2))* ///
(exp(`xb1')-exp(`xb0'))*`onswitch'
|
|
base/f/fpredict.ado:
|
106 [+]
|
quietly
gen
`type' `newvar'=`RSTU'*`RES'/sqrt((1-`HAT')*`SRES'[_N])
|
|
base/f/frac_mun.ado:
|
9 [+]
|
cap
drop
`name'*
All properties
| key |
content |
| command |
drop |
| indent |
2 |
| parameters |
`name'* |
| prefix |
cap |
|
|
base/f/fracpred.ado:
|
173 [+]
|
replace
`v' = `v'+((`j'<`i')+1)*`V'[`i',`j']*`xi'*`xj'
|
|
:
|
184 [+]
|
replace
`v'=`v'+2*`V'[`ncons',`i']*`xi'
|
|
:
|
201 [+]
|
replace
`v'=`v'+`xb'_b[`xi']*`xi'
|
|
base/f/fron_p.ado:
|
163 [+]
|
gen
`vtyp' `varn'=`mu1'+`sigma1'* /*
*/ (normd(-`z')/norm(`z')) /*
*/
if `cond'
|
|
base/f/fron_tn.ado:
|
45 [+]
|
qui
gen
double `w1' = (1-`gamma')*`zd' /*
*/ - $S_COST*`gamma'*(`ytilde'-`xb')
|
|
:
|
70 [+]
|
qui
gen
double `dditdg' = -.5*`zd'*(`gamma'^(-1.5))*`dgt'
|
|
:
|
81 [+]
|
qui
gen
double `gj2' = -(`ytilde'-`xb'+$S_COST*`zd')*$S_COST /*
*/ - `ratio1'/sqrt(`gamma') /*
*/ + `ratio2'*`dditsdzd'
|
|
:
|
90 [+]
|
qui
gen
double `dw1' = (-`zd'-$S_COST*(`ytilde'-`xb'))*`dgt'
|
|
:
|
122 [+]
|
qui
gen
double `d2w2' = `dw2'*(-0.5/`gamma'+0.5/(1-`gamma'))*`dgt' /*
*/ + `w2'*(0.5/(`gamma'^2)+0.5/(1-`gamma')^2)*`dgt'*`dgt' /*
*/ + `w2'*(-0.5/`gamma'+0.5/(1-`gamma'))*`d2gdg2'
|
|
base/g/gamhet_gp.ado:
|
144 [+]
|
gen
`vtyp' `varn'=exp(`sgn'sqrt(`ga')*`sigma'* /*
*/ ln(`cc'/`ga') + `xb')
if `touse'
|
|
:
|
165 [+]
|
gen
`vtyp' `varn'=(`sgn'sqrt(`ga')*`sigma'* /*
*/ ln(`cc'/`ga') + `xb')
if `touse'
|
|
:
|
203 [+]
|
qui
gen
double `ff'= exp(-`uu')*`uu'^(`ga'-1)* /*
*/ exp(-lngamma(`ga'))*`uu'/(sqrt(`ga')*`sigma'*`t') /*
*/
if `touse'
|
|
base/g/gamhet_ip.ado:
|
144 [+]
|
gen
`vtyp' `varn'=exp(`sgn'sqrt(`ga')*`sigma'* /*
*/ ln(`cc'/`ga') + `xb')
if `touse'
|
|
:
|
165 [+]
|
gen
`vtyp' `varn'=(`sgn'sqrt(`ga')*`sigma'* /*
*/ ln(`cc'/`ga') + `xb')
if `touse'
|
|
:
|
203 [+]
|
qui
gen
double `ff'= exp(-`uu')*`uu'^(`ga'-1)* /*
*/ exp(-lngamma(`ga'))*`uu'/(sqrt(`ga')*`sigma'*`t') /*
*/
if `touse'
|
|
base/g/gamma_d2.ado:
|
66 [+]
|
replace
`g1' = `dIdx'*`u'/ /*
*/ (sqrt(`l')*`sig'*`et')
if $ML_samp
|
|
:
|
74 [+]
|
replace
`g1' = `g1' - /*
*/ `dI0dx'*`u0'/ /*
*/ (sqrt(`l')*`sig'*`et0')
if $ML_samp & `t0'>0
|
|
:
|
80 [+]
|
replace
`g2' = `u'*`z'*sign(`k')* /*
*/ `dIdx' / /*
*/ (sqrt(`l')*`et')
if $ML_samp
|
|
:
|
84 [+]
|
replace
`g2' = `g2' - `d'* `g2'
All properties
| key |
content |
| command |
replace |
| indent |
2 |
| parameters |
`g2' = `g2' - `d'* `g2' |
|
|
:
|
86 [+]
|
replace
`g2' = `g2' + `d'*( /*
*/ (`z'* sqrt(`l'))*(`u'/`l' - 1) - 1)
if $ML_samp
|
|
:
|
89 [+]
|
replace
`g2' = `g2' - `u0'*`z0'*sign(`k')* /*
*/ `dI0dx'/ /*
*/ (sqrt(`l')*`et0')
if $ML_samp & `t0' > 0
|
|
:
|
95 [+]
|
replace
`g3' = (2.0*`l'*sqrt(`l')*`detl' - /*
*/ (`z' - 2.0*sqrt(`l'))* /*
*/ `dIdx'*`u')/`et'
if $ML_samp
|
|
:
|
101 [+]
|
replace
`g3' = `g3' + `d'* /*
*/ (-2.0*sign(`k')*`l'*sqrt(`l')* /*
*/ (ln(`l') +(`l' -0.5)/`l' - digamma(`l')) - /*
*/ sign(`k')*`z'*`l' - /*
*/ sign(`k')*`u'*(`z' - 2.0*sqrt(`l')))
if $ML_samp
|
|
:
|
107 [+]
|
replace
`g3' = `g3' - /*
*/ (2.0*`l'*sqrt(`l')*`det0l' - /*
*/ (`z0' - 2.0*sqrt(`l'))* /*
*/ `dI0dx'*`u0')/`et0'/*
*/
if $ML_samp & `t0'> 0
|
|
:
|
127 [+]
|
gen
double `d11' = (-`et'*`u'*sign(`k')*(`d2Idxdx'*`u' + /*
*/ `dIdx') - `u'^2*`dIdx'^2)/((`et'^2)*`l'*`sig'^2)
if $ML_samp
|
|
:
|
137 [+]
|
replace
`d11' = (1 - `d')*`d11'
if $ML_samp
|
|
:
|
141 [+]
|
replace
`d11' = `d11' - (-`et0'*`u0'*sign(`k')*(`d2I0dxdx' /*
*/ *`u0' + `dI0dx') - `u0'^2*`dI0dx'^2)/(`et0'^2*`l'*`sig'^2)/*
*/
if $ML_samp & `t0'>0
|
|
:
|
153 [+]
|
generate
double `d12' = -`u'*`z'*(`dIdx' +`u'*`d2Idxdx')/ /*
*/ (`et'*`l'*`sig') - `u'*`dIdx'*(`et'*sqrt(`l') + /*
*/ sign(`k')*`dIdx'*`u'*`z')/(`et'^2*`l'*`sig')
if $ML_samp
|
|
:
|
164 [+]
|
replace
`d12' = (1 - `d')*`d12'
if $ML_samp
|
|
:
|
169 [+]
|
replace
`d12' = `d12' +`u0'*`z0'*(`dI0dx' +`u0'*`d2I0dxdx')/ /*
*/ (`et0'*`l'*`sig') + `u0'*`dI0dx'*(`et0'*sqrt(`l') + /*
*/ sign(`k')*`dI0dx'*`u0'*`z0')/(`et0'^2*`l'*`sig') /*
*/
if $ML_samp & `t0'> 0
|
|
:
|
182 [+]
|
generate
double `d13' = `u'*sign(`k')* /*
*/ ((`z'-2*sqrt(`l'))*(`dIdx'/*
*/ + `u'*`d2Idxdx') - 2*`l'*sqrt(`l')*`d2Idadx')/ /*
*/ (`et'*sqrt(`l')*`sig') - `u'*`dIdx'*(2*`l'*sqrt(`l')* /*
*/ `detl' - sign(`k')*sqrt(`l')*`et' - /*
*/ `u'*(`z' - 2*sqrt(`l'))*`dIdx')/((`et'^2)*sqrt(`l')*`sig')/*
*/
if $ML_samp
|
|
:
|
209 [+]
|
replace
`d13' = (1 - `d')*`d13'
if $ML_samp
|
|
:
|
214 [+]
|
generate
double `d130' = /*
*/ `u0'*sign(`k')*((`z0'-2*sqrt(`l'))*(`dI0dx'/*
*/ + `u0'*`d2I0dxdx') - 2*`l'*sqrt(`l')*`d2I0dadx')/ /*
*/ (`et0'*sqrt(`l')*`sig') - `u0'*`dI0dx'*(2*`l'*sqrt(`l')* /*
*/ `det0l' - sign(`k')*sqrt(`l')*`et0' - /*
*/ `u0'*(`z0' - 2*sqrt(`l'))*`dI0dx')
|
|
:
|
245 [+]
|
generate
double `d22' = (-`et'*sign(`k')*`u'*`z' /*
*/ *(`d2Idxdx'*`u'*`z' + `z'*`dIdx' + sqrt(`l')*`dIdx') - /*
*/ (`u'*`z')^2*`dIdx'^2)/(`et'^2*`l')
if $ML_samp
|
|
:
|
257 [+]
|
replace
`d22' = (1-`d')*`d22'
if $ML_samp
|
|
:
|
262 [+]
|
replace
`d22' = `d22' - /*
*/ (-`et0'*sign(`k')*`u0'*`z0' /*
*/ *(`d2I0dxdx'*`u0'*`z0' + `z0'*`dI0dx' + /*
*/ sqrt(`l')*`dI0dx') - /*
*/ (`u0'*`z0')^2*`dI0dx'^2)/(`et0'^2*`l') /*
*/
if $ML_samp & `t0' > 0
|
|
:
|
278 [+]
|
generate
double `d23' = `u'*`z'*(`et'*sqrt(`l')*( /*
*/ (`z'-2*sqrt(`l'))*(`u'*`d2Idxdx' + `dIdx') - /*
*/ 2*`d2Idadx'*`l'*sqrt(`l')) - sign(`k')*`dIdx'*( /*
*/ -`dIdx'*sqrt(`l')*`u'*(`z' - 2*sqrt(`l')) + /*
*/ 2*`detl'*`l'^2 - `et'*sign(`k')*`l'))/(`et'^2*`l') /*
*/
if $ML_samp
|
|
:
|
296 [+]
|
replace
`d23' = (1-`d')*`d23'
if $ML_samp
|
|
:
|
298 [+]
|
replace
`d23' = `d23' + `d'* /*
*/ sign(`k')*(`z'*`u'+ `z'*`l' + /*
*/ `z'*`u'*(`z'- 2*sqrt(`l'))/sqrt(`l')) /*
*/
if $ML_samp
|
|
:
|
303 [+]
|
replace
`d23' = `d23' - /*
*/ `u0'*`z0'*(`et0'*sqrt(`l')*( /*
*/ (`z0'-2*sqrt(`l'))*(`u0'*`d2I0dxdx' + `dI0dx') - /*
*/ 2*`d2I0dadx'*`l'*sqrt(`l')) - sign(`k')*`dI0dx'*( /*
*/ -`dI0dx'*sqrt(`l')*`u0'*(`z0' - 2*sqrt(`l')) + /*
*/ 2*`det0l'*`l'^2 - `et0'*sign(`k')*`l'))/(`et0'^2*`l') /*
*/
if $ML_samp & `t0' > 0
|
|
:
|
326 [+]
|
generate
double `d33' = 2*sign(`k')*`l'^2*(-3*`detl' /*
*/ + `u'*(`z'-2*sqrt(`l'))*`d2Idadx'/sqrt(`l') /*
*/ - 2*`l'*`ddetl')/`et'
if $ML_samp
|
|
:
|
330 [+]
|
replace
`d33' = `d33' - 2*`l'*sqrt(`l')*`detl'*( /*
*/ -`u'*(`z' - 2*sqrt(`l'))*`dIdx' /*
*/ + 2*`l'*sqrt(`l')*`detl')/(`et'^2)
if $ML_samp
|
|
:
|
334 [+]
|
replace
`d33' = `d33' - sign(`k')*`u'*( /*
*/ ((`z'-2*sqrt(`l'))^2)*(`dIdx' + `u'*`d2Idxdx') /*
*/ + 2*`l'*`dIdx' /*
*/ - 2*`l'*sqrt(`l')*(`z'-2*sqrt(`l'))*`d2Idadx')/`et' /*
*/
if $ML_samp
|
|
:
|
340 [+]
|
replace
`d33' = `d33' + `u'*(`z'-2*sqrt(`l'))*`dIdx'* /*
*/ (-`u'*(`z'-2*sqrt(`l'))*`dIdx' /*
*/ + 2*`l'*sqrt(`l')*`detl')/(`et'^2)
if $ML_samp
|
|
:
|
345 [+]
|
replace
`d33' = (1-`d')*`d33'
if $ML_samp
|
|
:
|
355 [+]
|
replace
`d33' = `d33' - 2*sign(`k')*(`l'^2)*(-3*`det0l' /*
*/ + `u0'*(`z0'-2*sqrt(`l'))*`d2I0dadx'/sqrt(`l') /*
*/ - 2*`l'*`ddet0l')/`et0'
if $ML_samp & `t0'>0
|
|
:
|
359 [+]
|
replace
`d33' = `d33' + 2*`l'*sqrt(`l')*`det0l'*( /*
*/ -`u0'*(`z0' - 2*sqrt(`l'))*`dI0dx' /*
*/ + 2*`l'*sqrt(`l')*`det0l')/(`et0'^2)
if $ML_samp & `t0'>0
|
|
:
|
363 [+]
|
replace
`d33' = `d33' + sign(`k')*`u0'*( /*
*/ ((`z0'-2*sqrt(`l'))^2)*(`dI0dx' + `u0'*`d2I0dxdx') /*
*/ + 2*`l'*`dI0dx' /*
*/ - 2*`l'*sqrt(`l')*(`z0'-2*sqrt(`l'))*`d2I0dadx')/`et0' /*
*/
if $ML_samp & `t0'>0
|
|
:
|
369 [+]
|
replace
`d33' = `d33' - `u0'*(`z0'-2*sqrt(`l'))*`dI0dx'* /*
*/ (-`u0'*(`z0'-2*sqrt(`l'))*`dI0dx' /*
*/ + 2*`l'*sqrt(`l')*`det0l')/(`et0'^2)
if $ML_samp & `t0'>0
|
|
base/g/gamma_p.ado:
|
148 [+]
|
qui
replace
`varn'= `sgn'*log(`varn')*`sigma' /*
*/ +(abs(`kappa')*`xb')
|
|
:
|
234 [+]
|
qui
gen
double `ff'=((`l'-0.5)*ln(`l')) /*
*/ + (`z'*sqrt(`l'))-`l'*exp(`z'/sqrt(`l')) /*
*/ -lngamma(`l') - ln(`t'* `sigma')
if `touse'
|
|
base/g/glim_l01.ado:
|
19 [+]
|
gen
double `mu' = `eta'*$SGLM_m
|
|
base/g/glim_l04.ado:
|
20 [+]
|
gen
double `return' = `mu'*(1+`mu'*$SGLM_a)
|
|
:
|
24 [+]
|
gen
double `return' = `mu'*(1+`mu'*$SGLM_a)*(1+2*`mu'*$SGLM_a)
|
|
base/g/glim_l09.ado:
|
27 [+]
|
gen
double `return' = 2*`mu'*`mu'*`mu'/($SGLM_m*$SGLM_m)
|
|
base/g/glim_l11.ado:
|
23 [+]
|
gen
double `return' = `mu'^(1-$SGLM_p)*$SGLM_m^$SGLM_p/$SGLM_p
|
|
:
|
27 [+]
|
gen
double `return' = `mu'^(1-2*$SGLM_p)*(1/$SGLM_p)* /*
*/ (1/$SGLM_p-1)*$SGLM_m^$SGLM_p
|
|
base/g/glim_lf.ado:
|
33 [+]
|
qui
replace
`score' = ($ML_y1 - `mu')/(`phi'*`v')*`dmu'
if $ML_samp
|
|
base/g/glim_p.ado:
|
211 [+]
|
qui
gen
double `pt' = _b[`t']*`t'
|
|
base/g/glim_v6.ado:
|
31 [+]
|
gen
double `return' = `mu'+`mu'*`mu'*$SGLM_a
|
|
:
|
43 [+]
|
gen
double `return' = cond(`y'==0, /*
*/ 2*ln(1+`mu'*$SGLM_a)/$SGLM_a, /*
*/ 2*(`y'*ln(`y'/`mu') - /*
*/ (1+`y'*$SGLM_a)/$SGLM_a * /*
*/ ln((1+`y'*$SGLM_a)/(1+`mu'*$SGLM_a))))
|
|
:
|
90 [+]
|
gen
double `return' = (2 - `mu') / sqrt(`mu'+`mu'*`mu'*$SGLM_a)
|
|
base/g/glm.ado:
|
2140 [+]
|
qui
replace
`vt1' = `x'[_n-`j']*`res'*`res'[_n-`j']* /*
*/ `wv'[_n-`j']
if `touse'
|
|
base/g/glm_p.ado:
|
122 [+]
|
gen
double `V' = (`mu'+`e(k)'*`mu'^2)
if `touse'
|
|
base/g/glmpred.ado:
|
118 [+]
|
gen
double `V' = (`mu'+`e(k)'*`mu'^2)
|
|
base/g/gmm.ado:
|
1118 [+]
|
qui
replace
`normwt' = r(N)*`normwt'/r(sum)
|
|
base/g/gomp_lf.ado:
|
29 [+]
|
gen
double `et0' = exp(`g'*$EREGt0)
|
|
:
|
43 [+]
|
replace
`B' = `B' - (`L'/`g')*((`et'*`t')-(`et0'*$EREGt0))
|
|
base/g/gomper_p.ado:
|
128 [+]
|
gen
`vtyp' `varn'=(1/`gamma')* /*
*/ (ln(exp(`xb') + ln(2)*`gamma') - `xb')
if `touse'
|
|
base/g/gompertz.ado:
|
144 [+]
|
gen
double `den' = sum(`wvn'*(`t'-$EREGt0)*`touse')
|
|
base/g/gompertzhet.ado:
|
225 [+]
|
gen
double `den' = sum(`wvn'*(`t'-$EREGt0)*`touse')
|
|
base/g/gomphet_glf.ado:
|
81 [+]
|
replace
`c0' = cond(`t0'>0, /*
*/ (-`f0'+exp(`beta')*`th'*(`t0'*`t0'* /*
*/ exp(`ga'*`t0')- /*
*/ `t0'*exp(`ga'*`t0')/`ga' + (exp(`ga'*`t0')-1)/ /*
*/ (`ga'*`ga')))/`ga',0)
|
|
base/g/gomphet_glf_sh.ado:
|
31 [+]
|
gen
double `logs' = exp(`beta')/`gam'* /*
*/ (`expgt0' - `expgt')
if $ML_samp
|
|
base/g/gomphet_ilf.ado:
|
41 [+]
|
gen
double `f' = (2*`th'*exp(`beta')*`t'* /*
*/ exp(`ga'*`t')-`b')/`ga'
if $ML_samp
|
|
:
|
43 [+]
|
gen
double `f0' = cond(`t0'>0,(2*`th'*exp(`beta')*`t0'* /*
*/ exp(`ga'*`t0')-`b0')/`ga',0)
if $ML_samp
|
|
base/g/gomphet_ilf_sh.ado:
|
32 [+]
|
gen
double `logs' = exp(`beta')/`gam'* /*
*/ (`expgt0' - `expgt')
if $ML_samp
|
|
:
|
128 [+]
|
replace
`dz' = cond(`sumd'<., /*
*/ -(1/`c' - 1)*`ith'^2 + /*
*/ `c'*`sums'*(`a'*`sums' - `ith') , 0) /*
*/
if $ML_samp
|
|
base/g/gomphet_ip.ado:
|
175 [+]
|
qui
gen
double `ff'= `kk'/sqrt(1+2*`theta'/`gamma'* /*
*/ (`kk'-exp(`xb')))
if `touse'
|
|
base/g/gsem.ado:
|
31 [+]
|
capture
drop
`GSEM'*
All properties
| key |
content |
| command |
drop |
| indent |
1 |
| parameters |
`GSEM'* |
| prefix |
capture |
|
|
base/g/gsem_p.ado:
|
8 [+]
|
capture
drop
`tname'*
All properties
| key |
content |
| command |
drop |
| indent |
1 |
| parameters |
`tname'* |
| prefix |
capture |
|
|
base/g/gsem_parse.ado:
|
256 [+]
|
capture
drop
`GSEM'*
All properties
| key |
content |
| command |
drop |
| indent |
1 |
| parameters |
`GSEM'* |
| prefix |
capture |
|
|
base/h/hadimvo.ado:
|
144 [+]
|
replace
`D'=(`r'-1)*`D'/`cf'
All properties
| key |
content |
| command |
replace |
| indent |
2 |
| parameters |
`D'=(`r'-1)*`D'/`cf' |
|
|
:
|
169 [+]
|
replace
`D'=(`r'-1)*`D'/`cf'
All properties
| key |
content |
| command |
replace |
| indent |
3 |
| parameters |
`D'=(`r'-1)*`D'/`cf' |
|
|
base/h/heck_d2.ado:
|
34 [+]
|
qui
gen
double `eta' = (`Is' + /*
*/ ($ML_y1-`Ir')*`rho'/`sig') / sqrt(1-`rho'^2)
|
|
:
|
59 [+]
|
qui
replace
`sc3' = /*
*/ cond(`y2',`M'*(`ym'*`rr'+`eta'*`rho'*`rr'^2)*`dlr',0)
|
|
base/h/heckma_p.ado:
|
209 [+]
|
label
var `varn' "E(`depname'*|Pr(`selname'))"
|
|
base/h/hereg.ado:
|
123 [+]
|
gen
`score' = (`Fakedv'-`predz')*`hess'
|
|
base/i/ipolate.ado:
|
61 [+]
|
by `touse' `by':
replace
`z'=`m'[_N]*`x'+`b'[_N] /*
*/
if `touse' & `ismiss'
|
|
:
|
72 [+]
|
by `touse' `by':
replace
`z'=`M'[_N]*`x'+`B'[_N] /*
*/
if `touse' & `ismiss'
|
|
base/i/ivpoisson.ado:
|
558 [+]
|
qui
replace
`normwt' = r(N)*`normwt'/r(sum)
|
|
base/i/ivregress.ado:
|
255 [+]
|
qui
replace
`normwt' = r(N)*`normwt'/r(sum)
if `touse'
|
|
base/i/ivregress_estat.ado:
|
1281 [+]
|
qui
replace
`normwt' = r(N)*`normwt' / r(sum)
|
|
base/k/kdensity.ado:
|
207 [+]
|
qui
replace
`m' = r(min)-`wwidth'+(_n-1)*`delta'
in 1/`n'
|
|
base/k/kdensity_7.ado:
|
128 [+]
|
qui
replace
`m' = r(min)-`wwidth'+(_n-1)*`delta'
in 1/`n'
|
|
:
|
178 [+]
|
qui
replace
`tden' = `tden'/(`ft'[_N]*`scale')
|
|
base/l/lfit.ado:
|
348 [+]
|
gen
double `qx' = cond(`m'==1, `dw'*`x'[1]/`w'[1],
cond((_n-1)*`dw'>=`w'[`m'-1],
`dw'*(`x'[`m']-`x'[`m'-1])/(`w'[`m']-`w'[`m'-1]),
(_n*`dw'-`w'[`m'-1])
+ `x'[`m'-1] ))
in 1/`group'
-
*(`x'[`m']-`x'[`m'-1])/(`w'[`m']-`w'[`m'-1])
gen double `qx' = cond(`m'==1, `dw'*`x'[1]/`w'[1],
cond((_n-1)*`dw'>=`w'[`m'-1],
`dw'*(`x'[`m']-`x'[`m'-1])/(`w'[`m']-`w'[`m'-1]),
(_n*`dw'-`w'[`m'-1])
+ `x'[`m'-1] ))
in 1/`group'
|
|
:
|
355 [+]
|
replace
`qx' = `qx' - `x'[`m'[_n-1]]
+ cond(`m'[_n-1]==1,
(`w'[1]-(_n-1)*`dw')*`x'[1]/`w'[1],
(`w'[`m'[_n-1]]-(_n-1)*`dw')
/(`w'[`m'[_n-1]]-`w'[`m'[_n-1]-1]) )
in 2/`group'
if `m'>1 & (_n-1)*`dw'<`w'[`m'-1]
-
*(`x'[`m'[_n-1]]-`x'[`m'[_n-1]-1])
replace `qx' = `qx' - `x'[`m'[_n-1]]
+ cond(`m'[_n-1]==1,
(`w'[1]-(_n-1)*`dw')*`x'[1]/`w'[1],
(`w'[`m'[_n-1]]-(_n-1)*`dw')
/(`w'[`m'[_n-1]]-`w'[`m'[_n-1]-1]) )
in 2/`group'
if `m'>1 & (_n-1)*`dw'<`w'[`m'-1]
|
|
base/l/lloghet_glf.ado:
|
42 [+]
|
replace
`g3' = -`a'*`th'*exp(-`c')*`f' + /*
*/ (`c'-`c0')/`th' + exp(-`c0')*`f0'
|
|
:
|
45 [+]
|
replace
`b' = (`b'-1)*`ga'/`b'
All properties
| key |
content |
| command |
replace |
| indent |
2 |
| parameters |
`b' = (`b'-1)*`ga'/`b' |
|
|
:
|
46 [+]
|
replace
`b0' = cond(`t0'>0,(`b0'-1)*`ga'/`b0',0)
|
|
:
|
55 [+]
|
replace
`g2' = -`a'*`th'*exp(-`c')*`b' + exp(-`c0')*`b0' + /*
*/ `d'*(`ga'*(`beta'-ln(`t'))-1-`b')
|
|
:
|
68 [+]
|
gen
double `h' = -`b'*`ga'* /*
*/ (-`b'*(`t'*exp(-`beta'))^(-`ga')+1)
if $ML_samp
|
|
:
|
70 [+]
|
gen
double `h0' = cond(`t0'>0,-`b0'*`ga'* /*
*/ (-`b0'*(`t0'*exp(-`beta'))^(-`ga')+1),0)
if $ML_samp
|
|
base/l/lloghet_glf_sh.ado:
|
64 [+]
|
gen
double `logst' = `iga'*( (1-1/`F')*`lntmu' - /*
*/ (1-1/`F0')*`lntmu0' )
|
|
base/l/lloghet_ilf.ado:
|
54 [+]
|
replace
`g1' = `ga'*(`f'*`c' - `f0'*`c0' + `d'* /*
*/ (`f'*(1+`th'*`c'*`c') - 1))
|
|
:
|
61 [+]
|
replace
`g2' = (`h0'*`c0' - `h'*`c')/`ga' - `d'* /*
*/ (1 + ln(`t')*`ga' - `beta'*`ga' + `h'/`ga'* /*
*/ (`th'*`c'*`c'+1))
|
|
base/l/lloghet_ilf_sh.ado:
|
67 [+]
|
gen
double `logst' = `iga'*((1-1/`F')*`lntmu' - /*
*/ (1-1/`F0')*`lntmu0' )
|
|
:
|
144 [+]
|
replace
`dz' = cond(`sumd'<., /*
*/ -(1/`c' - 1)*`ith'^2 + /*
*/ `c'*`sums'*(`a'*`sums' - `ith') , 0) /*
*/
if $ML_samp
|
|
base/l/lloghet_ip.ado:
|
137 [+]
|
gen
`vtyp' `varn'=exp(`xb')*`cc'
if `touse'
|
|
base/l/lnorm_lf.ado:
|
40 [+]
|
qui
replace
`w1'=`d'*( (1/`es')*`lntxb' - `R'/`es') /*
*/ + `R'/`es' - cond(`t0'>0, `R0'/`es', 0)
|
|
:
|
58 [+]
|
gen
double `f'=`d'*( (-1/`e2s') /*
*/ -(1/`e2s')*((`lntxb')*`net'*`et' /*
*/ -`net'*`net' )/(`et'*`et') ) /*
*/ +(1/`e2s')*((`lntxb')*`net'*`et' /*
*/ -`net'*`net' )/(`et'*`et')
|
|
:
|
70 [+]
|
replace
`f'=`d'*((-2/`es')*`lntxb' /*
*/ -(1/`es')* ( -`R'+ ((`lntxb'^2)*`net'*`et' /*
*/ -`net'*`net'*`lntxb')/(`et'*`et')) ) /*
*/ +(1/`es')* ( -`R'+ ((`lntxb'^2)*`net'*`et' /*
*/ -`net'*`net'*`lntxb')/(`et'*`et'))
|
|
:
|
76 [+]
|
replace
`f'=`f'-(1/`es')* ( -`R0'+ /*
*/ ((`lntxb0'^2)*`net0'*`et0' /*
*/ -`net0'*`net0'*`lntxb0')/(`et0'*`et0')) /*
*/
if `t0'>0
|
|
:
|
84 [+]
|
replace
`f'=`d'*( -2*(`lntxb'^2) /*
*/ -`lntxb'*( ( (`lntxb'^2)*`net'*`et' /*
*/ -`net'*`net'*`lntxb') /(`et'*`et')) /*
*/ +`lntxb'*`R' ) /*
*/ +`lntxb'*(( (`lntxb'^2)*`net'*`et' /*
*/ -`net'*`net'*`lntxb')/(`et'*`et')) /*
*/ -`lntxb'*`R'
|
|
:
|
91 [+]
|
replace
`f'=`f' /*
*/ -`lntxb0'*(((`lntxb0'^2)*`net0'*`et0' /*
*/ -`net0'*`net0'*`lntxb0') /(`et0'*`et0')) /*
*/ +`lntxb0'*`R0'
if `t0'>0
|
|
base/l/lnormhet_ilf.ado:
|
77 [+]
|
replace
`c' = `f'*(`c'-`th'*`h'*`h'*`f'*`f') - /*
*/ `d'*(-1+2*`th'*`th'*`h'*`h'*(`f'^4) + /*
*/ (1-`th'*`f'*`f')*`c')
|
|
base/l/lnormhet_ilf_sh.ado:
|
148 [+]
|
replace
`dz' = cond(`sumd'<., /*
*/ -(1/`c' - 1)*`ith'^2 + /*
*/ `c'*`sums'*(`a'*`sums' - `ith') , 0) /*
*/
if $ML_samp
|
|
base/l/logis_lf.ado:
|
33 [+]
|
qui
replace
`w1'=-(`d'*`g'-(1+`d')*`et'*`g'/(1+`et'))
|
|
:
|
40 [+]
|
qui
replace
`w2'=-(`d'*(`I'*`g' +1+`g'*log(`t')) /*
*/ -(1+`d')*`et'*(`I'+log(`t'))*`g'/(1+`et'))
|
|
:
|
42 [+]
|
qui
replace
`w2' =`w2' - `et0'*(`I'+log(`t0'))*`g'/(1+`et0') /*
*/
if `t0'> 0
|
|
:
|
71 [+]
|
qui
replace
`C'=`d'*`g'*(`xblnt') /*
*/ -(1+`d')*`et'*`g'*`xblnt'* /*
*/ ((`xblnt'*`g')+1+`et')/(1+`et')^2
|
|
base/l/logit_p.ado:
|
231 [+]
|
by `keep' `rhs':
gen
long `y'=cond(_n==_N, /*
*/ sum((`e(depvar)'!=0 & `e(depvar)'<.)*`w'), .)
|
|
:
|
258 [+]
|
replace
`s' = `m'*`p'*(1-`p')*`s'*`s'
if `keep'
|
|
base/l/logrank.ado:
|
258 [+]
|
gen
double `wi' = sum( `ni'*(`n'-`ni')*`cons' )
|
|
base/l/lowess.ado:
|
208 [+]
|
replace
`ys' = `ys'* r(mean)/`mean'
if `touse'
|
|
base/l/lowess_7.ado:
|
147 [+]
|
replace
`ys' = `ys'* r(mean)/`mean'
if `touse'
|
|
base/l/lpoly.ado:
|
284 [+]
|
qui
replace
`xgrid' = r(min) + (_n - 1)*`delta'
in 1/`n'
|
|
base/l/lpredict.ado:
|
89 [+]
|
by `keep' `rhs':
gen
long `y'=cond(_n==_N, /*
*/ sum((`l'!=0 & `l'!=.)*`w') ,.)
|
|
:
|
111 [+]
|
replace
`new'=`m'*`p'*(1-`p')*`rthat'*`rthat'
|
|
base/l/lsens_x.ado:
|
23 [+]
|
gen
double `sumy' = sum((`y'==0)*`w')
if `touse'
|
|
:
|
29 [+]
|
replace
`sumy' = sum((`y'!=0)*`w')
if `touse'
|
|
base/l/ltable.ado:
|
207 [+]
|
gen
`H' = 2*`fail'/((2-`fail')*`dI')
|
|
base/l/ltable_7.ado:
|
131 [+]
|
gen
`H' = 2*`fail'/((2-`fail')*`dI')
|
|
base/l/ltable_9.ado:
|
183 [+]
|
gen
`H' = 2*`fail'/((2-`fail')*`dI')
|
|
base/m/mdslong.ado:
|
363 [+]
|
gen
`j12' = cond(`j1'<`j2', (`j1'-1)*`n'+`j2', (`j2'-1)*`n'+`j1')
|
|
base/m/merge_10.ado:
|
198 [+]
|
qui
recode
`_merge'?* (1 .=0) (2/5=1)
All properties
| key |
content |
| command |
recode |
| indent |
3 |
| parameters |
`_merge'?* (1 .=0) (2/5=1) |
| prefix |
qui |
|
|
base/m/mfp_10.ado:
|
445 [+]
|
cap
drop
`stub`i''*
All properties
| key |
content |
| command |
drop |
| indent |
2 |
| parameters |
`stub`i''* |
| prefix |
cap |
|
|
base/m/mgarch_dvech_p.ado:
|
719 [+]
|
qui
predict
double `res'*
if `touse'
, residuals
|
|
base/m/mhodds.ado:
|
239 [+]
|
qui by `touse' `strata' `by':
gen
double `pt'= /*
*/ sum((`d'+`h')*`wt')
if `touse'
|
|
:
|
244 [+]
|
qui by `touse' `strata' `by':
gen
double `p1'= /*
*/ sum((`d'+`h')*`e'*`wt')
if `touse'
|
|
:
|
246 [+]
|
qui by `touse' `strata' `by':
gen
double `p2' = /*
*/ sum((`d'+`h')*`e'*`e'*`wt')
if `touse'
|
|
base/m/ml_5.ado:
|
401 [+]
|
gen
double `sumff' = sum(`ff'*$S_mlwgt)
|
|
:
|
623 [+]
|
qui
gen
double `fatS' = sum(`fmhi'*$S_mlwgt)
|
|
:
|
672 [+]
|
qui
replace
`fatS' = sum(`fmhi'*$S_mlwgt)
|
|
base/n/nbreg.ado:
|
543 [+]
|
qui
replace
`z' = lngamma(`y'+exp(`z')) - lngamma(`y'+1) /*
*/ - lngamma(exp(`z')) + `lndelta'*`y' - (`y'+exp(`z'))*`lnoned' `if'
|
|
base/n/nbreg_al.ado:
|
45 [+]
|
qui
replace
`g2' = `y' - (`y'+`m')*`delta'/(1+`delta') - `g1' /*
*/
if $ML_samp
|
|
base/n/newey.ado:
|
165 [+]
|
replace
`vt1' = `x'*`e'* /*
*/ l`j'.`e'*l`j'.`wvar'* /*
*/ `ow'
if `touse'
|
|
base/n/newey_7.ado:
|
116 [+]
|
replace
`vt1' = `x'[_n-`j']*`e'* /*
*/ `e'[_n-`j']*`wvar'[_n-`j']* /*
*/ `ow'
if `touse'
|
|
base/n/nl_p.ado:
|
211 [+]
|
qui
replace
`varlist' = `plow'*`lb' + /*
*/ (1-`plow')*`e' /*
*/ if !mi(`lb') & mi(`ub') & `touse'
|
|
:
|
214 [+]
|
qui
replace
`varlist' = `pmid'*`e' + /*
*/ (1-`pmid')*`ub' /*
*/ if mi(`lb') & !mi(`ub') & `touse'
|
|
:
|
217 [+]
|
qui
replace
`varlist' = `plow' * `lb' + /*
*/ `pmid'*`e' + (1-`plow'-`pmid')*`ub' /*
*/ if !mi(`lb') & !mi(`ub') & `touse'
|
|
base/n/nlog_rd.ado:
|
110 [+]
|
qui
replace
`di' = /*
*/ (${ML_y`m'} - `p`j''*${ML_y`k'})
if `touse'
|
|
:
|
223 [+]
|
qui
replace
`ck' = cond($ML_y1,`Ij'* ///
(cond(${ML_y`l2'}==`jlev',1,0)+`dldtj'),0)
-
qui replace `ck' = cond($ML_y1,`Ij'* ///
(cond(${ML_y`l2'}==`jlev',1,0)+`dldtj'),0)
|
|
base/n/nlsur.ado:
|
493 [+]
|
qui
replace
`normwt' = r(N)*`normwt'/r(sum)
|
|
base/o/orthog.ado:
|
72 [+]
|
replace
`x`j'' = `x`j'' - r(mean)*`x`i''
|
|
:
|
100 [+]
|
replace
`x`j'' = `x`j'' - r(mean)*`x`i''
|
|
base/o/orthpoly.ado:
|
66 [+]
|
gen
double `q`i'' = (`a'*`x' + `b')*`q`j'' /*
*/ - `c'*`q`k''
if `doit'
|
|
base/p/probit_p.ado:
|
180 [+]
|
by `keep' `uorhs':
gen
long `y'=cond(_n==_N, /*
*/ sum((`e(depvar)'!=0 & `e(depvar)'<.)*`w'), .)
|
|
base/q/qreg_c.ado:
|
32 [+]
|
qui
replace
`r'=cond(`r'>=0,`quant',`quant'-1)*`r'
|
|
base/q/quantile.ado:
|
25 [+]
|
gen
`LINE'=`QUANT'[1] + `CNT'* /*
*/ ((`QUANT'[`CNT'[_N]]-`QUANT'[1])/`CNT'[_N])
|
|
base/q/quantile_7.ado:
|
11 [+]
|
gen
`LINE'=`QUANT'[1] + `CNT'* /*
*/ ((`QUANT'[`CNT'[_N]]-`QUANT'[1])/`CNT'[_N])
|
|
base/r/regre_p2.ado:
|
126 [+]
|
replace
`Y' = `p'*`E' + (1-`p')*`lb' /*
*/
if `touse' & `lb'!=. & `ub'==.
|
|
:
|
128 [+]
|
replace
`Y' = `p'*`E' + (1-`p')*`ub' /*
*/
if `touse' & `lb'==. & `ub'!=.
|
|
:
|
130 [+]
|
replace
`Y' = `p'*`E' + `p2'*`lb' + (1-`p'-`p2')*`ub' /*
*/
if `touse' & `lb'!=. & `ub'!=.
|
|
base/r/regres_p.ado:
|
250 [+]
|
gen
`type' `newvar'=`RSTU'*`RES'/sqrt((1-`HAT')*`SRES'[_N])
|
|
base/r/rocreg_p.ado:
|
407 [+]
|
qui
replace
`intercept_`varit'' = ///
`bmat'[1,`icr']*`ivar'+
|
|
base/r/rocregstat.ado:
|
342 [+]
|
qui
gen
double `roc_`vvit''= ///
`eb'[1,`ic'] + ///
`eb'[1,`sc']*`lirc'
|
|
base/r/roctab.ado:
|
615 [+]
|
by `touse' `C':
gen
`row1' = sum(`touse'*(1-`D')*`wv')
|
|
:
|
628 [+]
|
gen
`row6' = `row3'*(`row4'*(`row4'+`row1')+(1/3)*`row1'^2)
if `touse'
|
|
:
|
631 [+]
|
gen
`row7' = `row1'*(`row2'*(`row2'+`row3')+(1/3)*`row3'^2)
if `touse'
|
|
base/r/roctab_7.ado:
|
499 [+]
|
by `touse' `C':
gen
`row1' = sum(`touse'*(1-`D')*`wv')
|
|
:
|
512 [+]
|
gen
`row6' = `row3'*(`row4'*(`row4'+`row1')+(1/3)*`row1'^2)
if `touse'
|
|
:
|
515 [+]
|
gen
`row7' = `row1'*(`row2'*(`row2'+`row3')+(1/3)*`row3'^2)
if `touse'
|
|
base/r/rologit_p.ado:
|
94 [+]
|
gen
`vtyp' `varn' = `p'*(1-`p')*`b'
if `touse'
|
|
base/r/rreg.ado:
|
182 [+]
|
replace
`y'= `y' + /*
*/ (`lambda'*`scale'/`aa')*(`res'/`scale')*`weight' /*
*/
if `touse'
|
|
base/s/sample.ado:
|
89 [+]
|
by `by':
replace
`N'=int(`N'[_N]*`exp'/100+.5)
|
|
base/s/sem.ado:
|
81 [+]
|
capture
drop
`SEM'*
All properties
| key |
content |
| command |
drop |
| indent |
2 |
| parameters |
`SEM'* |
| prefix |
capture |
|
|
base/s/slogit_d2.ado:
|
31 [+]
|
replace
`p`i'' = `p`i'' - el(`phi`dm'',1,`i')*`xb`dm''
|
|
base/s/stmh.ado:
|
193 [+]
|
by `str' `by':
gen
double `d1' = /*
*/ sum(`wt'*_d *`e')
|
|
:
|
204 [+]
|
gen
double `d1' = sum(`wt'*_d *`e')
|
|
base/s/stphtest.ado:
|
229 [+]
|
gen
double `wrk' = sum(cond(e(sample), /*
*/ (`rnk'-`rvar')*``i'', 0))
|
|
:
|
265 [+]
|
gen
double `gnum' = sum(cond(e(sample), /*
*/ (`rnk'-`rvar')*``i'',0))
|
|
base/s/stphtest_7.ado:
|
205 [+]
|
gen
double `wrk' = sum(cond(e(sample), /*
*/ (`rnk'-`rvar')*``i'', 0))
|
|
:
|
241 [+]
|
gen
double `gnum' = sum(cond(e(sample), /*
*/ (`rnk'-`rvar')*``i'',0))
|
|
base/s/suest.ado:
|
184 [+]
|
capture
predict
double `sci'*
if `esamp'
, score
|
|
base/s/svygen.ado:
|
78 [+]
|
quietly by `by' :
replace
`wgt' = (_n==1)*`postwt'
|
|
base/s/svytab.ado:
|
771 [+]
|
gen
double `x' = ($S_VYexp)*`y'
|
|
:
|
1438 [+]
|
gen
double `xc' = e(total)*`bij'
in 1/`ncat'
|
|
:
|
1441 [+]
|
replace
`xc' = e(total)*`matr'[1,_n-`Nr1'+1] /*
*/
in `Nr1'/`Nr2'
|
|
:
|
1443 [+]
|
replace
`xc' = e(total)*`matc'[1,_n-`Nc1'+1] /*
*/
in `Nc1'/`Nc2'
|
|
:
|
1527 [+]
|
replace
`xse' = `porp'* /*
*/ sqrt(`V'[_n-`Nr1'+1, /*
*/ _n-`Nr1'+1])
in `Nr1'/`Nr2'
|
|
:
|
1533 [+]
|
replace
`xse' = `porp'* /*
*/ sqrt(`V'[_n-`Nc1'+1, /*
*/ _n-`Nc1'+1])
in `Nc1'/`Nc2'
|
|
base/s/svytab_7.ado:
|
759 [+]
|
gen
double `x' = ($S_VYexp)*`y'
|
|
:
|
1349 [+]
|
gen
double `xc' = e(total)*`bij'
in 1/`ncat'
|
|
:
|
1352 [+]
|
replace
`xc' = e(total)*`matr'[1,_n-`Nr1'+1] /*
*/
in `Nr1'/`Nr2'
|
|
:
|
1354 [+]
|
replace
`xc' = e(total)*`matc'[1,_n-`Nc1'+1] /*
*/
in `Nc1'/`Nc2'
|
|
:
|
1436 [+]
|
replace
`xse' = `porp'* /*
*/ sqrt(`V'[_n-`Nr1'+1, /*
*/ _n-`Nr1'+1])
in `Nr1'/`Nr2'
|
|
:
|
1442 [+]
|
replace
`xse' = `porp'* /*
*/ sqrt(`V'[_n-`Nc1'+1, /*
*/ _n-`Nc1'+1])
in `Nc1'/`Nc2'
|
|
base/t/tnbreg.ado:
|
650 [+]
|
qui
replace
`z' = lngamma(`y'+exp(`z')) - lngamma(`y'+1) /*
*/ - lngamma(exp(`z')) + `lndelta'*`y' - (`y'+exp(`z'))*`lnoned' /*
*/ - ln(nbinomialtail(exp(`z'),$ztnb_tp+1,(1+exp(`mudelta')) )) `if'
|
|
base/t/tnbreg_cons.ado:
|
114 [+]
|
qui
gen
double `f2' = `y' -(`y'+`m')*`delta'/
All properties
| key |
content |
| command |
gen |
| comment |
///
(1+`delta') - `z2' if $ML_samp |
| indent |
2 |
| parameters |
double `f2' = `y' -(`y'+`m')*`delta'/ |
| prefix |
qui |
|
|
base/t/tnbreg_mean.ado:
|
160 [+]
|
qui
gen
double `z3' = cond($ML_samp & `tp'==0, ///
-`p'^(`m'+1)*`mu'/ `z2', ///
cond($ML_samp & `tp'>0, ///
-(`x3'-`x2')/(2*`h2'), .))
-
qui gen double `z3' = cond($ML_samp & `tp'==0, ///
-`p'^(`m'+1)*`mu'/ `z2', ///
cond($ML_samp & `tp'>0, ///
-(`x3'-`x2')/(2*`h2'), .))
|
|
base/t/treatr_p.ado:
|
157 [+]
|
gen
`vtyp' `varn' = `Xb'- `trtname'*[`depname']_b[`trtname'] /*
*/ + [`depname']_b[`trtname'] + (normd(`Xbprb') / /*
*/ normprob(`Xbprb')) * `sigma' * `rho'
|
|
:
|
166 [+]
|
gen
`vtyp' `varn' = `Xb'- `trtname'*[`depname']_b[`trtname'] /*
*/ - (normd(`Xbprb')/normprob(-`Xbprb')) /*
*/ * `sigma' * `rho'
|
|
base/t/trnb_cons.ado:
|
48 [+]
|
qui
replace
`g1' = `z2'-(1+`delta')^(-`m')*`lnoned'*`m' /*
*/ / `z3'
if $ML_samp
|
|
:
|
51 [+]
|
qui
replace
`g2' = `y' -(`y'+`m')*`delta'/(1+`delta') - `z2' /*
*/ + (1+ `delta')^(-`m')*(`m'*ln(1+`delta') /*
*/ -`mu'/(1+`delta') )/ `z3'
if $ML_samp
|
|
base/t/trnb_mean.ado:
|
45 [+]
|
replace
`sc1' = `p'*(`y'-`mu') - /*
*/ `p'^(`m'+1)*`mu'/ `z2'
if $ML_samp
|
|
base/u/u_mi_impute_fv2var.ado:
|
11 [+]
|
cap
drop
`fvstub'*
All properties
| key |
content |
| command |
drop |
| indent |
2 |
| parameters |
`fvstub'* |
| prefix |
cap |
|
|
base/w/weib1_lf.ado:
|
38 [+]
|
replace
`g2' = /*
*/ `p'*(((`xb'-`lnt')*`eplnt' - (`xb'-`lnt0')*`eplnt0') /*
*/ + `d'*((`lnt'-`xb' + 1/`p')))
|
|
base/w/weibhet_glfa.ado:
|
25 [+]
|
gen
double `b' = exp(-`beta'*`p')*`t'^`p'
if $ML_samp
|
|
:
|
26 [+]
|
gen
double `b0' = cond(`t0'>0, exp(-`beta'*`p')*`t0'^`p',0) /*
*/
if $ML_samp
|
|
base/w/weibhet_gp.ado:
|
180 [+]
|
qui
gen
double `kk' = exp(`xb')*`t'^(`auxp'-1) /*
*/
if `touse'
|
|
:
|
195 [+]
|
qui
gen
double `ff'= 1+`theta'*exp(`xb')*`t'^`auxp' /*
*/
if `touse'
|
|
:
|
197 [+]
|
qui
gen
double `ff0'= 1+`theta'*exp(`xb')*`t0'^`auxp' /*
*/
if `t0'>0 & `touse'
|
|
:
|
226 [+]
|
qui
gen
double `ff'= /*
*/ (`d'!=0)-(1/`theta')* /*
*/ ln(1+`theta'*exp(`xb')*`t'^`auxp')
if `touse'
|
|
:
|
229 [+]
|
qui
replace
/*
*/ `ff'=`ff'+(1/`theta')* /*
*/ ln(1+`theta'*exp(`xb')*`t0'^`auxp') /*
*/
if `t0'>0 & `touse'
|
|
base/w/weibhet_ilf.ado:
|
26 [+]
|
gen
double `b' = exp(`beta')*`t'^`p'
if $ML_samp
|
|
:
|
27 [+]
|
gen
double `b0' = cond(`t0'>0, exp(`beta')*`t0'^`p',0) /*
*/
if $ML_samp
|
|
:
|
41 [+]
|
replace
`g1' = -`f' + `f0' + `d'* /*
*/ (1 - `th'*`f'/`c')
All properties
| key |
content |
| command |
replace |
| indent |
2 |
| parameters |
`g1' = -`f' + `f0' + `d'* /*
*/ (1 - `th'*`f'/`c') |
|
|
:
|
43 [+]
|
replace
`g2' = (-`f'*`lnt' + `f0'*`lnt0' + `d'*`lnt'* /*
*/ (1-`th'*`f'/`c'))*`p' + `d'
|
|
base/w/weibhet_ilf_sh.ado:
|
128 [+]
|
replace
`dz' = cond(`sumd'!=., /*
*/ -(1/`c' - 1)*`ith'^2 + /*
*/ `c'*`sums'*(`a'*`sums' - `ith') , 0) /*
*/
if $ML_samp
|
|
base/w/weibhet_ilfa_sh.ado:
|
136 [+]
|
replace
`dz' = cond(`sumd'!=., /*
*/ -(1/`c' - 1)*`ith'^2 + /*
*/ `c'*`sums'*(`a'*`sums' - `ith') , 0) /*
*/
if $ML_samp
|
|
base/w/weibhet_ip.ado:
|
183 [+]
|
qui
gen
double `kk' = exp(`xb')*`t'^(`auxp'-1)
if `touse'
|
|
:
|
197 [+]
|
qui
gen
double `ff'= 1+2*`theta'*exp(`xb')*`t'^`auxp' /*
*/
if `touse'
|
|
:
|
199 [+]
|
qui
gen
double `ff0'= 1+2*`theta'*exp(`xb')*`t0'^`auxp' /*
*/
if `t0'>0 & `touse'
|
|
:
|
228 [+]
|
qui
gen
double `ff'= /*
*/ (`d'!=0)+(1/`theta')* /*
*/ (1-sqrt(1+2*`theta'*exp(`xb')*`t'^`auxp'))
if `touse'
|
|
:
|
231 [+]
|
qui
replace
/*
*/ `ff'=`ff'-(1/`theta')* /*
*/ (1-sqrt(1+2*`theta'*exp(`xb')*`t0'^`auxp')) /*
*/
if `t0'>0 & `touse'
|
|
base/w/weibul_p.ado:
|
237 [+]
|
gen
`vtyp' `varn' = /*
*/ exp( -exp(`rgn'*`xb')* `t'^`aux_p' ) / /*
*/ exp( -exp(`rgn'*`xb')*`t0'^`aux_p' )
if `touse'
|
|
base/w/wntestb_7.ado:
|
297 [+]
|
gen
int `mapy' = ($S_GPH_ay)*`y' + ($S_GPH_by)
|
|
:
|
298 [+]
|
gen
int `mapx' = ($S_GPH_ax)*`x' + ($S_GPH_bx)
|
|
:
|
315 [+]
|
gen
int `mapy1'=($S_GPH_ay)*`inarg' + ($S_GPH_by)
|
|
:
|
317 [+]
|
gen
int `mapx1'=($S_GPH_ax)*`inarg' + ($S_GPH_bx)
|
|
:
|
333 [+]
|
replace
`mapy2'=($S_GPH_ay)*`inarg' + ($S_GPH_by)
|
|
:
|
336 [+]
|
replace
`mapx2'=($S_GPH_ax)*`inarg' + ($S_GPH_bx)
|
|
:
|
396 [+]
|
gen
int `mapy' = ($S_GPH_ay)*`y' + ($S_GPH_by)
|
|
:
|
397 [+]
|
gen
int `mapx' = ($S_GPH_ax)*`x' + ($S_GPH_bx)
|
|
:
|
489 [+]
|
gen
int `mapy' = ($S_GPH_ay)*`y' + ($S_GPH_by)
|
|
:
|
490 [+]
|
gen
int `mapx' = ($S_GPH_ax)*`x' + ($S_GPH_bx)
|
|
base/x/xi.ado:
|
423 [+]
|
label
var `stub'`num1' "(`lbl1')*`part2'"
|
|
base/x/xi_6.ado:
|
215 [+]
|
label
var `stub'`num1' "(`lbl1')*`part2'"
|
|
base/x/xtcloglog.ado:
|
420 [+]
|
gen
double `logFc' = log((`sn'==1) -`sn'* exp(-exp(`xb')))
if `touse'
|
|
base/x/xtgee.ado:
|
1564 [+]
|
replace
`dj' = 2*(`y'*ln(`y'/`mu')-(1+`k'*`y')/`k'* /*
*/ ln((1+`k'*`y')/(1+`k'*`mu')))
if `y'
|
|
:
|
1666 [+]
|
replace
`dj' = 2*(`y'*ln(`y'/`mu')-(1+`k'*`y')/`k'* /*
*/ ln((1+`k'*`y')/(1+`k'*`mu')))
if `y'
|
|
base/x/xtgee_p.ado:
|
229 [+]
|
qui
replace
`xb' = (`e(power)'*`xb'+1)^(1/`e(power)') /*
*/
if `touse'
|
|
base/x/xtgee_plink.ado:
|
42 [+]
|
replace
`m' = (`m'/`N'*.9999)*`N'
All properties
| key |
content |
| command |
replace |
| indent |
3 |
| parameters |
`m' = (`m'/`N'*.9999)*`N' |
|
|
base/x/xtgls.ado:
|
681 [+]
|
gen
double ${X_ee}`i' = $X_ee[`b0'+_n]
in 1/$X_nt
|
|
base/x/xtregar.ado:
|
308 [+]
|
qui by `id':
gen
`tvar'=(sqrt(1-`rho'^2))*`x'
if _n==1
|
|
:
|
554 [+]
|
replace
`g_i'=sqrt(1-`rho'^2)*`g_i'
|
|
:
|
1143 [+]
|
by `id':
gen
double `zresLD'=(`zres'-`zres'[_n-1]*`Itj')^2
|
|
base/x/xtsf_ll.ado:
|
76 [+]
|
gen
double `denom' = sqrt(`gamma'*(1-`gamma')*`sigmaS2' /*
*/ *(1+(`eta2'-1)*`gamma'))
if $ML_samp
|
|
:
|
83 [+]
|
gen
double `f' = -1/2*`T'*(ln(2*_pi)+ln(`sigmaS2')) /*
*/ - 1/2*(`T'-1)*ln(1-`gamma') /*
*/ - 1/2*ln(1+(`eta2'-1)*`gamma') /*
*/ - ln(normprob(`z')) - 1/2*`z'^2 /*
*/ + ln(normprob(`zi')) /*
*/ + 1/2*`zi'^2 /*
*/ - 1/2*(`e2'/((1-`gamma')*`sigmaS2'))
|
|
:
|
143 [+]
|
gen
double `dne' = /*
*/ `sigmaS2'*(`gamma'-`gamma'^2)*`gamma'*`deta2'
|
|
:
|
151 [+]
|
gen
double `dzgamma' = -(`mu'+$S_COST*`eta_e')/`denom' /*
*/ - 0.5*(`mu'*(1-`gamma')-$S_COST*`gamma'*`eta_e') /*
*/ *`dng'/(`denom'^3)
|
|
:
|
157 [+]
|
gen
double `dzeta' = -$S_COST*`gamma'*`deta_e'/`denom' /*
*/ - (`mu'*(1-`gamma')-$S_COST*`gamma'*`eta_e')*0.5 /*
*/ *`dne'/`denom'^3
|
|
base/x/xtsf_llti.ado:
|
71 [+]
|
gen
double `denom' = sqrt(`gamma'*(1-`gamma')*`sigmaS2' /*
*/ *(1+(`eta2'-1)*`gamma'))
if $ML_samp
|
|
:
|
78 [+]
|
gen
double `f' = -1/2*`T'*(ln(2*_pi)+ln(`sigmaS2')) /*
*/ - 1/2*(`T'-1)*ln(1-`gamma') /*
*/ - 1/2*ln(1+(`eta2'-1)*`gamma') /*
*/ - ln(normprob(`z')) - 1/2*`z'^2 /*
*/ + ln(normprob(`zi')) /*
*/ + 1/2*`zi'^2 /*
*/ - 1/2*(`e2'/((1-`gamma')*`sigmaS2'))
if $ML_samp
|
|
:
|
131 [+]
|
gen
double `dzgamma' = -(`mu'+$S_COST*`eta_e')/`denom' /*
*/ - 0.5*(`mu'*(1-`gamma')-$S_COST*`gamma'*`eta_e') /*
*/ *`dng'/(`denom'^3)
|
|
base/z/zinb_llf.ado:
|
39 [+]
|
qui
gen
double `fz' = exp(`zg')*`f1'*`f1'
if $ML_samp
|
|
:
|
71 [+]
|
qui
replace
`ttt' = cond(`y' == 0,
(-`f1'*`mu'*`p'^(`m'+1)*
(`alpha'*`mu'*(`m'+1)*`p'-1))/`f2' +
`sc1'*`sc1',
`alpha'*`mu'*`p'^2*(`y'-`mu')+`mu'*`p' )
if $ML_samp
|
|
:
|
84 [+]
|
qui
replace
`ttt' = cond(`y' == 0,
(-`f1'*`mu'*`p'^(`m'+1)*((`m'+1)*`mu'*`p'+
`m'*`m'*ln(`p')))/`f2' +
`f1'*`f1'*`mu'*`p'^(2*`m'+1)*(`m'*`mu'*`p'+
`m'*`m'*ln(`p'))/(`f2'*`f2'),
`mu'*`p'^2*(`y'-`mu') )
if $ML_samp
-
qui replace `ttt' = cond(`y' == 0,
(-`f1'*`mu'*`p'^(`m'+1)*((`m'+1)*`mu'*`p'+
`m'*`m'*ln(`p')))/`f2' +
`f1'*`f1'*`mu'*`p'^(2*`m'+1)*(`m'*`mu'*`p'+
`m'*`m'*ln(`p'))/(`f2'*`f2'),
`mu'*`p'^2*(`y'-`mu') ) if $ML_samp
|
|
:
|
93 [+]
|
qui
replace
`ttt' = cond(`y' == 0 ,
-(1-exp(`zg'))*`f1'*`fz'*(1-`p'^`m') / `f2' +
(`fz'*(1-`p'^`m') / `f2')^2 ,
(1-exp(`zg'))*`f1'*`fz'/`f1' + (`fz'/`f1')^2)
if $ML_samp
|
|
:
|
99 [+]
|
qui
replace
`ttt' = cond(`y' == 0,
-`fz'/`f2'*(1+(1-`p'^`m')*`f1'/`f2')*
`p'^`m'*(`m'*`m'*ln(`p')+`m'*`mu'*`p'),
0 )
if $ML_samp
|
|
base/z/zinb_plf.ado:
|
70 [+]
|
qui
replace
`ttt' = cond(`y' == 0,
(-`f1'*`mu'*`p'^(`m'+1)*
(`alpha'*`mu'*(`m'+1)*`p'-1))/`f2' +
`sc1'*`sc1',
`alpha'*`mu'*`p'^2*(`y'-`mu')+`mu'*`p' )
if $ML_samp
|
|
:
|
77 [+]
|
qui
replace
`ttt' = cond(`y' == 0,
-normd(`zg')*`mu'*`p'^(`m'+1) / `f2' -
`f1'*`mu'*`p'^(`m'+1)*normd(`zg')*(1-`p'^`m') / (`f2'*`f2') ,
0 )
if $ML_samp
|
|
:
|
83 [+]
|
qui
replace
`ttt' = cond(`y' == 0,
(-`f1'*`mu'*`p'^(`m'+1)*((`m'+1)*`mu'*`p'+
`m'*`m'*ln(`p')))/`f2' +
`f1'*`f1'*`mu'*`p'^(2*`m'+1)*(`m'*`mu'*`p'+
`m'*`m'*ln(`p'))/(`f2'*`f2'),
`mu'*`p'^2*(`y'-`mu') )
if $ML_samp
-
qui replace `ttt' = cond(`y' == 0,
(-`f1'*`mu'*`p'^(`m'+1)*((`m'+1)*`mu'*`p'+
`m'*`m'*ln(`p')))/`f2' +
`f1'*`f1'*`mu'*`p'^(2*`m'+1)*(`m'*`mu'*`p'+
`m'*`m'*ln(`p'))/(`f2'*`f2'),
`mu'*`p'^2*(`y'-`mu') ) if $ML_samp
|
|
:
|
98 [+]
|
qui
replace
`ttt' = cond(`y' == 0,
-normd(`zg')/`f2'*(1+(1-`p'^`m')*`f1'/`f2')*
`p'^`m'*(`m'*`m'*ln(`p')+`m'*`mu'*`p'),
0 )
if $ML_samp
|
|
base/z/zip.ado:
|
375 [+]
|
replace
`prhat'=(1-`psihat')*(exp(-1*`muhat') /*
*/ *`muhat'^`dep')/exp(lnfact(`dep')) /*
*/
if `dep'>0 & `dep'<. & `touse'
|
|
base/z/zip_llf.ado:
|
27 [+]
|
qui
gen
double `fz' = exp(`zg')*`f1'*`f1'
if $ML_samp
|
|
:
|
58 [+]
|
qui
replace
`ttt' = cond($ML_y1 == 0,
-`fz'*`lambda'*exp(-`lambda') / `f2' -
`fz'*(1-exp(-`lambda'))*`f1'*
`lambda'*exp(-`lambda') / `f2'^2,
0)
if $ML_samp
|
|
:
|
66 [+]
|
qui
replace
`ttt' = cond($ML_y1 == 0 ,
-(1-exp(`zg'))*`f1'*`fz'*(1-exp(-`lambda')) / `f2' +
(`fz'*(1-exp(-`lambda')) / `f2')^2 ,
(1-exp(`zg'))*`f1'*`fz'/`f1' + (`fz'/`f1')^2)
if $ML_samp
|
|
base/z/zip_plf.ado:
|
58 [+]
|
qui
replace
`ttt' = cond($ML_y1 == 0,
-normd(`zg')*`lambda'*exp(-`lambda') / `f2' -
normd(`zg')*(1-exp(-`lambda'))*`f1'*
`lambda'*exp(-`lambda') / `f2'^2,
0)
if $ML_samp
|
|
base/z/ztnb.ado:
|
501 [+]
|
qui
replace
`z' = lngamma(`y'+exp(`z')) - lngamma(`y'+1) /*
*/ - lngamma(exp(`z')) + `lndelta'*`y' - (`y'+exp(`z'))*`lnoned' /*
*/ - ln(1-(1+exp(-`lndelta'*`mudelta'))) `if'
|
-
-
Script Output
close: Closing price Number of Observations
--------------------- ------------------------------
Total Integers Nonintegers
| # Negative - - -
| # Zero - - -
| # # Positive 248 - 248
| # # ----- ----- -----
| # # # # Total 248 - 248
| . # # # # Missing -
+---------------------- -----
965.8 1373.73 248
(More than 99 unique values)
Variable | Obs Mean Std. Dev. Min Max
-------------+--------------------------------------------------------
close | 248 1194.179 86.79468 965.8 1373.73
@mean 1194.179
@sd 86.795
@min 965.800
@max 1373.730
@example0 1283.27
@histh .00029654, .00074135, .00059308, .0014827, .00222405, .00237232, .00563427, .0040033, .00341022, .0040033, .00429984, .00252059, .00177924, .0014827, .00192751
@histw 979.39764, 1006.593, 1033.7883, 1060.9836, 1088.179, 1115.3743, 1142.5697, 1169.765, 1196.9603, 1224.1556, 1251.351, 1278.5463, 1305.7417, 1332.937, 1360.1323
@type float
@label Closing price
@class other
@N_unique .
@N 248
|
[+]
date
@sp500.dta |
|
other
(int)
|
248
(.)
|
(x̄=15156.855, 105.333) [14977,15340] |
Date
|
All properties
| key |
content |
| N |
248 |
| N_unique |
. |
| class |
other |
| example0 |
14977 |
| histh |
.0029992, .00249933, .0029992, .00266596, .00283258, .00283258, .00283258, .00266596, .00283258, .0029992, .00199947, .0029992, .00266596, .00283258, .00266596 |
| histw |
14989.1, 15013.3, 15037.5, 15061.7, 15085.9, 15110.1, 15134.3, 15158.5, 15182.7, 15206.9, 15231.1, 15255.3, 15279.5, 15303.7, 15327.9 |
| label |
Date |
| max |
15340 |
| mean |
15156.855 |
| min |
14977 |
| sd |
105.333 |
| type |
int |
Data Manipulations with date
| file |
# |
command |
-
-
Script Output
date: Date Number of Observations
----------- ------------------------------
Total Integers Nonintegers
| # Negative - - -
| # # # # # Zero - - -
| # # # # # Positive 248 248 -
| # # # # # ----- ----- -----
| # # # # # Total 248 248 -
| # # # # # Missing -
+---------------------- -----
14977 15340 248
(More than 99 unique values)
Variable | Obs Mean Std. Dev. Min Max
-------------+--------------------------------------------------------
date | 248 15156.85 105.3335 14977 15340
@mean 15156.855
@sd 105.333
@min 14977
@max 15340
@example0 14977
@histh .0029992, .00249933, .0029992, .00266596, .00283258, .00283258, .00283258, .00266596, .00283258, .0029992, .00199947, .0029992, .00266596, .00283258, .00266596
@histw 14989.1, 15013.3, 15037.5, 15061.7, 15085.9, 15110.1, 15134.3, 15158.5, 15182.7, 15206.9, 15231.1, 15255.3, 15279.5, 15303.7, 15327.9
@type int
@label Date
@class other
@N_unique .
@N 248
|
[+]
high
@sp500.dta |
|
other
(float)
|
248
(.)
|
(x̄=1204.044, 86.535) [984.540,1383.370] |
High price
|
All properties
| key |
content |
| N |
248 |
| N_unique |
. |
| class |
other |
| example0 |
1320.28 |
| histh |
.00030331, .00060661, .00090992, .00197149, .00197149, .00318472, .00530786, .00409464, .00394298, .00333637, .00470125, .00181984, .00151653, .00242645, .00151653 |
| histw |
997.83429, 1024.423, 1051.0116, 1077.6003, 1104.189, 1130.7777, 1157.3663, 1183.955, 1210.5437, 1237.1323, 1263.7209, 1290.3097, 1316.8983, 1343.4869, 1370.0757 |
| label |
High price |
| max |
1383.370 |
| mean |
1204.044 |
| min |
984.540 |
| sd |
86.535 |
| type |
float |
Data Manipulations with high
| file |
# |
command |
|
base/a/arch.ado:
|
552 [+]
|
qui
gen
double `wt_e2' = .7^(`timevar'-r(tmin))*$Te2 /*
*/
if `touse'
|
|
:
|
1131 [+]
|
qui
gen
double $Te_tarch = ($Te > 0)*$Te2
|
|
base/a/arch_dr.ado:
|
86 [+]
|
qui
gen
double `wt_e2' = /*
*/ .7^($Ttimevar-$Ttimemin)*$Te2 /*
*/
if $ML_samp
|
|
:
|
208 [+]
|
qui
gen
double `wt_e2' = /*
*/ .7^($Ttimevar-$Ttimemin)*$Te2
if $ML_samp
|
|
base/b/boxcox_p.ado:
|
80 [+]
|
gen
`vtyp' `varn' = (e(L)*`xb'+1)^(1/e(L)) /*
*/
if `touse'
|
|
base/b/bsample.ado:
|
168 [+]
|
gen
`r' = int(uniform()*`nmax' + 1)
|
|
:
|
357 [+]
|
gen
double `r' = int(uniform()*`nclust' + 1)
in 1/`nclust'
|
|
:
|
539 [+]
|
by `strata' `clid' `obsid':
replace
`r' = (`clid'-1)*`nclust'+_n-1
|
|
:
|
574 [+]
|
by `strata' `clid' `obsid':
replace
`r' = (`clid'-1)*`nclust'+_n-1
|
|
base/b/bsample_7.ado:
|
99 [+]
|
gen
double `r' = int(uniform()*`nclust' + 1)
in 1/`nclust'
|
|
:
|
115 [+]
|
by `clid' `obsid':
replace
`r' = (`clid'-1)*`nclust'+_n-1
|
|
base/c/clogit.ado:
|
654 [+]
|
qui by `touse' `group':
gen
double `i' = (_n==1&`touse')*`freq'
|
|
base/c/cluster.ado:
|
2291 [+]
|
qui by `tousevar' :
gen
long `grpvar' = /*
*/ int(((_n-1)/_N)*`k') + 1
if `tousevar'
|
|
:
|
2391 [+]
|
qui
replace
`var'=uniform()*`vrange'+`vmin' /*
*/
in `Np1'/`newN'
|
|
base/c/cluster_tree_8.ado:
|
905 [+]
|
qui
gen
double `cind' = `lbuf' + (`ncols'-`rbuf'-`lbuf')*`atx'/`maxx' /*
*/
if `atx' < .
|
|
base/c/cusum.ado:
|
44 [+]
|
replace
`x' = `x'+uniform()*`jx'
-
/*
To avoid ties and ensure a unique sort order for x,
randomly jitter x by .00001 times its range using a fixed seed
Answer: No, setting the seed screws up Monte Carlo experiments.
*/
replace `x' = `x'+uniform()*`jx'
|
|
base/c/cusum_7.ado:
|
27 [+]
|
replace
`x' = `x'+uniform()*`jx'
-
/*
To avoid ties and ensure a unique sort order for x,
randomly jitter x by .00001 times its range using a fixed seed
Answer: No, setting the seed screws up Monte Carlo experiments.
*/
replace `x' = `x'+uniform()*`jx'
|
|
base/d/dfgls.ado:
|
126 [+]
|
gen
double `dty'=`varlist'-_b[`iota']-_b[`qdtrd']*`trd'
|
|
base/d/dvech_p.ado:
|
700 [+]
|
qui
predict
double `res'*
if `touse'
, residuals
|
|
base/e/ereg.ado:
|
172 [+]
|
gen
double `lnf' = `wv' * ///
(`d'*`cons'-exp(`cons')*`realt')
|
|
base/e/ereg_lf.ado:
|
13 [+]
|
quietly
replace
`g1' = $ML_y2-exp(`I')*$ML_y1
|
|
base/e/ereg_p.ado:
|
348 [+]
|
gen
`typlist' `varlist' = `minus'(`d'-exp(`minus'`I')*`t')
if `touse'
|
|
base/e/ereghet_glf.ado:
|
22 [+]
|
gen
double `b' = exp(`beta')*`t'
if $ML_samp
|
|
:
|
23 [+]
|
gen
double `b0' = cond(`t0'>0, exp(`beta')*`t0',0) /*
*/
if $ML_samp
|
|
base/e/ereghet_gp.ado:
|
206 [+]
|
qui
gen
double `ff'= 1+`theta'*exp(`xb')*`t'
if `touse'
|
|
:
|
207 [+]
|
qui
gen
double `ff0'= 1+`theta'*exp(`xb')*`t0' /*
*/
if `t0'>0 & `touse'
|
|
:
|
236 [+]
|
qui
gen
double `ff'= /*
*/ (`d'!=0)-(1/`theta')* /*
*/ ln(1+`theta'*exp(`xb')*`t')
if `touse'
|
|
:
|
239 [+]
|
qui
replace
/*
*/ `ff'=`ff'+(1/`theta')* /*
*/ ln(1+`theta'*exp(`xb')*`t0') /*
*/
if `t0'>0 & `touse'
|
|
base/e/ereghet_ilf.ado:
|
21 [+]
|
gen
double `b' = exp(`beta')*`t'
if $ML_samp
|
|
:
|
22 [+]
|
gen
double `b0' = cond(`t0'>0, exp(`beta')*`t0',0) /*
*/
if $ML_samp
|
|
:
|
53 [+]
|
gen
double `dt' = `th'*(`f'*`f'/`c' - cond(`t0'>0, /*
*/ `f0'*`f0'/`c0',0) - `d'*`f'/`c'* /*
*/ (1-2*`th'*`f'/`c'))
|
|
base/e/ereghet_ilf_sh.ado:
|
97 [+]
|
replace
`dz' = cond(`sumd'<., /*
*/ -(1/`c' - 1)*`ith'^2 + /*
*/ `c'*`sums'*(`a'*`sums' - `ith') , 0) /*
*/
if $ML_samp
|
|
base/e/ereghet_ip.ado:
|
206 [+]
|
qui
gen
double `ff'= 1+2*`theta'*exp(`xb')*`t'
if `touse'
|
|
:
|
207 [+]
|
qui
gen
double `ff0'= 1+2*`theta'*exp(`xb')*`t0' /*
*/
if `t0'>0 & `touse'
|
|
:
|
236 [+]
|
qui
gen
double `ff'= /*
*/ (`d'!=0)+(1/`theta')* /*
*/ (1-sqrt(1+2*`theta'*exp(`xb')*`t'))
if `touse'
|
|
:
|
239 [+]
|
qui
replace
/*
*/ `ff'=`ff'-(1/`theta')* /*
*/ (1-sqrt(1+2*`theta'*exp(`xb')*`t0')) /*
*/
if `t0'>0 & `touse'
|
|
base/e/etpoisson_p.ado:
|
111 [+]
|
gen
`typlist' `varlist' = ///
exp(((`sigma'^2)/2))* ///
(exp(`xb1')-exp(`xb0'))*`onswitch'
|
|
base/f/fpredict.ado:
|
106 [+]
|
quietly
gen
`type' `newvar'=`RSTU'*`RES'/sqrt((1-`HAT')*`SRES'[_N])
|
|
base/f/frac_mun.ado:
|
9 [+]
|
cap
drop
`name'*
All properties
| key |
content |
| command |
drop |
| indent |
2 |
| parameters |
`name'* |
| prefix |
cap |
|
|
base/f/fracpred.ado:
|
173 [+]
|
replace
`v' = `v'+((`j'<`i')+1)*`V'[`i',`j']*`xi'*`xj'
|
|
:
|
184 [+]
|
replace
`v'=`v'+2*`V'[`ncons',`i']*`xi'
|
|
:
|
201 [+]
|
replace
`v'=`v'+`xb'_b[`xi']*`xi'
|
|
base/f/fron_p.ado:
|
163 [+]
|
gen
`vtyp' `varn'=`mu1'+`sigma1'* /*
*/ (normd(-`z')/norm(`z')) /*
*/
if `cond'
|
|
base/f/fron_tn.ado:
|
45 [+]
|
qui
gen
double `w1' = (1-`gamma')*`zd' /*
*/ - $S_COST*`gamma'*(`ytilde'-`xb')
|
|
:
|
70 [+]
|
qui
gen
double `dditdg' = -.5*`zd'*(`gamma'^(-1.5))*`dgt'
|
|
:
|
81 [+]
|
qui
gen
double `gj2' = -(`ytilde'-`xb'+$S_COST*`zd')*$S_COST /*
*/ - `ratio1'/sqrt(`gamma') /*
*/ + `ratio2'*`dditsdzd'
|
|
:
|
90 [+]
|
qui
gen
double `dw1' = (-`zd'-$S_COST*(`ytilde'-`xb'))*`dgt'
|
|
:
|
122 [+]
|
qui
gen
double `d2w2' = `dw2'*(-0.5/`gamma'+0.5/(1-`gamma'))*`dgt' /*
*/ + `w2'*(0.5/(`gamma'^2)+0.5/(1-`gamma')^2)*`dgt'*`dgt' /*
*/ + `w2'*(-0.5/`gamma'+0.5/(1-`gamma'))*`d2gdg2'
|
|
base/g/gamhet_gp.ado:
|
144 [+]
|
gen
`vtyp' `varn'=exp(`sgn'sqrt(`ga')*`sigma'* /*
*/ ln(`cc'/`ga') + `xb')
if `touse'
|
|
:
|
165 [+]
|
gen
`vtyp' `varn'=(`sgn'sqrt(`ga')*`sigma'* /*
*/ ln(`cc'/`ga') + `xb')
if `touse'
|
|
:
|
203 [+]
|
qui
gen
double `ff'= exp(-`uu')*`uu'^(`ga'-1)* /*
*/ exp(-lngamma(`ga'))*`uu'/(sqrt(`ga')*`sigma'*`t') /*
*/
if `touse'
|
|
base/g/gamhet_ip.ado:
|
144 [+]
|
gen
`vtyp' `varn'=exp(`sgn'sqrt(`ga')*`sigma'* /*
*/ ln(`cc'/`ga') + `xb')
if `touse'
|
|
:
|
165 [+]
|
gen
`vtyp' `varn'=(`sgn'sqrt(`ga')*`sigma'* /*
*/ ln(`cc'/`ga') + `xb')
if `touse'
|
|
:
|
203 [+]
|
qui
gen
double `ff'= exp(-`uu')*`uu'^(`ga'-1)* /*
*/ exp(-lngamma(`ga'))*`uu'/(sqrt(`ga')*`sigma'*`t') /*
*/
if `touse'
|
|
base/g/gamma_d2.ado:
|
66 [+]
|
replace
`g1' = `dIdx'*`u'/ /*
*/ (sqrt(`l')*`sig'*`et')
if $ML_samp
|
|
:
|
74 [+]
|
replace
`g1' = `g1' - /*
*/ `dI0dx'*`u0'/ /*
*/ (sqrt(`l')*`sig'*`et0')
if $ML_samp & `t0'>0
|
|
:
|
80 [+]
|
replace
`g2' = `u'*`z'*sign(`k')* /*
*/ `dIdx' / /*
*/ (sqrt(`l')*`et')
if $ML_samp
|
|
:
|
84 [+]
|
replace
`g2' = `g2' - `d'* `g2'
All properties
| key |
content |
| command |
replace |
| indent |
2 |
| parameters |
`g2' = `g2' - `d'* `g2' |
|
|
:
|
86 [+]
|
replace
`g2' = `g2' + `d'*( /*
*/ (`z'* sqrt(`l'))*(`u'/`l' - 1) - 1)
if $ML_samp
|
|
:
|
89 [+]
|
replace
`g2' = `g2' - `u0'*`z0'*sign(`k')* /*
*/ `dI0dx'/ /*
*/ (sqrt(`l')*`et0')
if $ML_samp & `t0' > 0
|
|
:
|
95 [+]
|
replace
`g3' = (2.0*`l'*sqrt(`l')*`detl' - /*
*/ (`z' - 2.0*sqrt(`l'))* /*
*/ `dIdx'*`u')/`et'
if $ML_samp
|
|
:
|
101 [+]
|
replace
`g3' = `g3' + `d'* /*
*/ (-2.0*sign(`k')*`l'*sqrt(`l')* /*
*/ (ln(`l') +(`l' -0.5)/`l' - digamma(`l')) - /*
*/ sign(`k')*`z'*`l' - /*
*/ sign(`k')*`u'*(`z' - 2.0*sqrt(`l')))
if $ML_samp
|
|
:
|
107 [+]
|
replace
`g3' = `g3' - /*
*/ (2.0*`l'*sqrt(`l')*`det0l' - /*
*/ (`z0' - 2.0*sqrt(`l'))* /*
*/ `dI0dx'*`u0')/`et0'/*
*/
if $ML_samp & `t0'> 0
|
|
:
|
127 [+]
|
gen
double `d11' = (-`et'*`u'*sign(`k')*(`d2Idxdx'*`u' + /*
*/ `dIdx') - `u'^2*`dIdx'^2)/((`et'^2)*`l'*`sig'^2)
if $ML_samp
|
|
:
|
137 [+]
|
replace
`d11' = (1 - `d')*`d11'
if $ML_samp
|
|
:
|
141 [+]
|
replace
`d11' = `d11' - (-`et0'*`u0'*sign(`k')*(`d2I0dxdx' /*
*/ *`u0' + `dI0dx') - `u0'^2*`dI0dx'^2)/(`et0'^2*`l'*`sig'^2)/*
*/
if $ML_samp & `t0'>0
|
|
:
|
153 [+]
|
generate
double `d12' = -`u'*`z'*(`dIdx' +`u'*`d2Idxdx')/ /*
*/ (`et'*`l'*`sig') - `u'*`dIdx'*(`et'*sqrt(`l') + /*
*/ sign(`k')*`dIdx'*`u'*`z')/(`et'^2*`l'*`sig')
if $ML_samp
|
|
:
|
164 [+]
|
replace
`d12' = (1 - `d')*`d12'
if $ML_samp
|
|
:
|
169 [+]
|
replace
`d12' = `d12' +`u0'*`z0'*(`dI0dx' +`u0'*`d2I0dxdx')/ /*
*/ (`et0'*`l'*`sig') + `u0'*`dI0dx'*(`et0'*sqrt(`l') + /*
*/ sign(`k')*`dI0dx'*`u0'*`z0')/(`et0'^2*`l'*`sig') /*
*/
if $ML_samp & `t0'> 0
|
|
:
|
182 [+]
|
generate
double `d13' = `u'*sign(`k')* /*
*/ ((`z'-2*sqrt(`l'))*(`dIdx'/*
*/ + `u'*`d2Idxdx') - 2*`l'*sqrt(`l')*`d2Idadx')/ /*
*/ (`et'*sqrt(`l')*`sig') - `u'*`dIdx'*(2*`l'*sqrt(`l')* /*
*/ `detl' - sign(`k')*sqrt(`l')*`et' - /*
*/ `u'*(`z' - 2*sqrt(`l'))*`dIdx')/((`et'^2)*sqrt(`l')*`sig')/*
*/
if $ML_samp
|
|
:
|
209 [+]
|
replace
`d13' = (1 - `d')*`d13'
if $ML_samp
|
|
:
|
214 [+]
|
generate
double `d130' = /*
*/ `u0'*sign(`k')*((`z0'-2*sqrt(`l'))*(`dI0dx'/*
*/ + `u0'*`d2I0dxdx') - 2*`l'*sqrt(`l')*`d2I0dadx')/ /*
*/ (`et0'*sqrt(`l')*`sig') - `u0'*`dI0dx'*(2*`l'*sqrt(`l')* /*
*/ `det0l' - sign(`k')*sqrt(`l')*`et0' - /*
*/ `u0'*(`z0' - 2*sqrt(`l'))*`dI0dx')
|
|
:
|
245 [+]
|
generate
double `d22' = (-`et'*sign(`k')*`u'*`z' /*
*/ *(`d2Idxdx'*`u'*`z' + `z'*`dIdx' + sqrt(`l')*`dIdx') - /*
*/ (`u'*`z')^2*`dIdx'^2)/(`et'^2*`l')
if $ML_samp
|
|
:
|
257 [+]
|
replace
`d22' = (1-`d')*`d22'
if $ML_samp
|
|
:
|
262 [+]
|
replace
`d22' = `d22' - /*
*/ (-`et0'*sign(`k')*`u0'*`z0' /*
*/ *(`d2I0dxdx'*`u0'*`z0' + `z0'*`dI0dx' + /*
*/ sqrt(`l')*`dI0dx') - /*
*/ (`u0'*`z0')^2*`dI0dx'^2)/(`et0'^2*`l') /*
*/
if $ML_samp & `t0' > 0
|
|
:
|
278 [+]
|
generate
double `d23' = `u'*`z'*(`et'*sqrt(`l')*( /*
*/ (`z'-2*sqrt(`l'))*(`u'*`d2Idxdx' + `dIdx') - /*
*/ 2*`d2Idadx'*`l'*sqrt(`l')) - sign(`k')*`dIdx'*( /*
*/ -`dIdx'*sqrt(`l')*`u'*(`z' - 2*sqrt(`l')) + /*
*/ 2*`detl'*`l'^2 - `et'*sign(`k')*`l'))/(`et'^2*`l') /*
*/
if $ML_samp
|
|
:
|
296 [+]
|
replace
`d23' = (1-`d')*`d23'
if $ML_samp
|
|
:
|
298 [+]
|
replace
`d23' = `d23' + `d'* /*
*/ sign(`k')*(`z'*`u'+ `z'*`l' + /*
*/ `z'*`u'*(`z'- 2*sqrt(`l'))/sqrt(`l')) /*
*/
if $ML_samp
|
|
:
|
303 [+]
|
replace
`d23' = `d23' - /*
*/ `u0'*`z0'*(`et0'*sqrt(`l')*( /*
*/ (`z0'-2*sqrt(`l'))*(`u0'*`d2I0dxdx' + `dI0dx') - /*
*/ 2*`d2I0dadx'*`l'*sqrt(`l')) - sign(`k')*`dI0dx'*( /*
*/ -`dI0dx'*sqrt(`l')*`u0'*(`z0' - 2*sqrt(`l')) + /*
*/ 2*`det0l'*`l'^2 - `et0'*sign(`k')*`l'))/(`et0'^2*`l') /*
*/
if $ML_samp & `t0' > 0
|
|
:
|
326 [+]
|
generate
double `d33' = 2*sign(`k')*`l'^2*(-3*`detl' /*
*/ + `u'*(`z'-2*sqrt(`l'))*`d2Idadx'/sqrt(`l') /*
*/ - 2*`l'*`ddetl')/`et'
if $ML_samp
|
|
:
|
330 [+]
|
replace
`d33' = `d33' - 2*`l'*sqrt(`l')*`detl'*( /*
*/ -`u'*(`z' - 2*sqrt(`l'))*`dIdx' /*
*/ + 2*`l'*sqrt(`l')*`detl')/(`et'^2)
if $ML_samp
|
|
:
|
334 [+]
|
replace
`d33' = `d33' - sign(`k')*`u'*( /*
*/ ((`z'-2*sqrt(`l'))^2)*(`dIdx' + `u'*`d2Idxdx') /*
*/ + 2*`l'*`dIdx' /*
*/ - 2*`l'*sqrt(`l')*(`z'-2*sqrt(`l'))*`d2Idadx')/`et' /*
*/
if $ML_samp
|
|
:
|
340 [+]
|
replace
`d33' = `d33' + `u'*(`z'-2*sqrt(`l'))*`dIdx'* /*
*/ (-`u'*(`z'-2*sqrt(`l'))*`dIdx' /*
*/ + 2*`l'*sqrt(`l')*`detl')/(`et'^2)
if $ML_samp
|
|
:
|
345 [+]
|
replace
`d33' = (1-`d')*`d33'
if $ML_samp
|
|
:
|
355 [+]
|
replace
`d33' = `d33' - 2*sign(`k')*(`l'^2)*(-3*`det0l' /*
*/ + `u0'*(`z0'-2*sqrt(`l'))*`d2I0dadx'/sqrt(`l') /*
*/ - 2*`l'*`ddet0l')/`et0'
if $ML_samp & `t0'>0
|
|
:
|
359 [+]
|
replace
`d33' = `d33' + 2*`l'*sqrt(`l')*`det0l'*( /*
*/ -`u0'*(`z0' - 2*sqrt(`l'))*`dI0dx' /*
*/ + 2*`l'*sqrt(`l')*`det0l')/(`et0'^2)
if $ML_samp & `t0'>0
|
|
:
|
363 [+]
|
replace
`d33' = `d33' + sign(`k')*`u0'*( /*
*/ ((`z0'-2*sqrt(`l'))^2)*(`dI0dx' + `u0'*`d2I0dxdx') /*
*/ + 2*`l'*`dI0dx' /*
*/ - 2*`l'*sqrt(`l')*(`z0'-2*sqrt(`l'))*`d2I0dadx')/`et0' /*
*/
if $ML_samp & `t0'>0
|
|
:
|
369 [+]
|
replace
`d33' = `d33' - `u0'*(`z0'-2*sqrt(`l'))*`dI0dx'* /*
*/ (-`u0'*(`z0'-2*sqrt(`l'))*`dI0dx' /*
*/ + 2*`l'*sqrt(`l')*`det0l')/(`et0'^2)
if $ML_samp & `t0'>0
|
|
base/g/gamma_p.ado:
|
148 [+]
|
qui
replace
`varn'= `sgn'*log(`varn')*`sigma' /*
*/ +(abs(`kappa')*`xb')
|
|
:
|
234 [+]
|
qui
gen
double `ff'=((`l'-0.5)*ln(`l')) /*
*/ + (`z'*sqrt(`l'))-`l'*exp(`z'/sqrt(`l')) /*
*/ -lngamma(`l') - ln(`t'* `sigma')
if `touse'
|
|
base/g/glim_l01.ado:
|
19 [+]
|
gen
double `mu' = `eta'*$SGLM_m
|
|
base/g/glim_l04.ado:
|
20 [+]
|
gen
double `return' = `mu'*(1+`mu'*$SGLM_a)
|
|
:
|
24 [+]
|
gen
double `return' = `mu'*(1+`mu'*$SGLM_a)*(1+2*`mu'*$SGLM_a)
|
|
base/g/glim_l09.ado:
|
27 [+]
|
gen
double `return' = 2*`mu'*`mu'*`mu'/($SGLM_m*$SGLM_m)
|
|
base/g/glim_l11.ado:
|
23 [+]
|
gen
double `return' = `mu'^(1-$SGLM_p)*$SGLM_m^$SGLM_p/$SGLM_p
|
|
:
|
27 [+]
|
gen
double `return' = `mu'^(1-2*$SGLM_p)*(1/$SGLM_p)* /*
*/ (1/$SGLM_p-1)*$SGLM_m^$SGLM_p
|
|
base/g/glim_lf.ado:
|
33 [+]
|
qui
replace
`score' = ($ML_y1 - `mu')/(`phi'*`v')*`dmu'
if $ML_samp
|
|
base/g/glim_p.ado:
|
211 [+]
|
qui
gen
double `pt' = _b[`t']*`t'
|
|
base/g/glim_v6.ado:
|
31 [+]
|
gen
double `return' = `mu'+`mu'*`mu'*$SGLM_a
|
|
:
|
43 [+]
|
gen
double `return' = cond(`y'==0, /*
*/ 2*ln(1+`mu'*$SGLM_a)/$SGLM_a, /*
*/ 2*(`y'*ln(`y'/`mu') - /*
*/ (1+`y'*$SGLM_a)/$SGLM_a * /*
*/ ln((1+`y'*$SGLM_a)/(1+`mu'*$SGLM_a))))
|
|
:
|
90 [+]
|
gen
double `return' = (2 - `mu') / sqrt(`mu'+`mu'*`mu'*$SGLM_a)
|
|
base/g/glm.ado:
|
2140 [+]
|
qui
replace
`vt1' = `x'[_n-`j']*`res'*`res'[_n-`j']* /*
*/ `wv'[_n-`j']
if `touse'
|
|
base/g/glm_p.ado:
|
122 [+]
|
gen
double `V' = (`mu'+`e(k)'*`mu'^2)
if `touse'
|
|
base/g/glmpred.ado:
|
118 [+]
|
gen
double `V' = (`mu'+`e(k)'*`mu'^2)
|
|
base/g/gmm.ado:
|
1118 [+]
|
qui
replace
`normwt' = r(N)*`normwt'/r(sum)
|
|
base/g/gomp_lf.ado:
|
29 [+]
|
gen
double `et0' = exp(`g'*$EREGt0)
|
|
:
|
43 [+]
|
replace
`B' = `B' - (`L'/`g')*((`et'*`t')-(`et0'*$EREGt0))
|
|
base/g/gomper_p.ado:
|
128 [+]
|
gen
`vtyp' `varn'=(1/`gamma')* /*
*/ (ln(exp(`xb') + ln(2)*`gamma') - `xb')
if `touse'
|
|
base/g/gompertz.ado:
|
144 [+]
|
gen
double `den' = sum(`wvn'*(`t'-$EREGt0)*`touse')
|
|
base/g/gompertzhet.ado:
|
225 [+]
|
gen
double `den' = sum(`wvn'*(`t'-$EREGt0)*`touse')
|
|
base/g/gomphet_glf.ado:
|
81 [+]
|
replace
`c0' = cond(`t0'>0, /*
*/ (-`f0'+exp(`beta')*`th'*(`t0'*`t0'* /*
*/ exp(`ga'*`t0')- /*
*/ `t0'*exp(`ga'*`t0')/`ga' + (exp(`ga'*`t0')-1)/ /*
*/ (`ga'*`ga')))/`ga',0)
|
|
base/g/gomphet_glf_sh.ado:
|
31 [+]
|
gen
double `logs' = exp(`beta')/`gam'* /*
*/ (`expgt0' - `expgt')
if $ML_samp
|
|
base/g/gomphet_ilf.ado:
|
41 [+]
|
gen
double `f' = (2*`th'*exp(`beta')*`t'* /*
*/ exp(`ga'*`t')-`b')/`ga'
if $ML_samp
|
|
:
|
43 [+]
|
gen
double `f0' = cond(`t0'>0,(2*`th'*exp(`beta')*`t0'* /*
*/ exp(`ga'*`t0')-`b0')/`ga',0)
if $ML_samp
|
|
base/g/gomphet_ilf_sh.ado:
|
32 [+]
|
gen
double `logs' = exp(`beta')/`gam'* /*
*/ (`expgt0' - `expgt')
if $ML_samp
|
|
:
|
128 [+]
|
replace
`dz' = cond(`sumd'<., /*
*/ -(1/`c' - 1)*`ith'^2 + /*
*/ `c'*`sums'*(`a'*`sums' - `ith') , 0) /*
*/
if $ML_samp
|
|
base/g/gomphet_ip.ado:
|
175 [+]
|
qui
gen
double `ff'= `kk'/sqrt(1+2*`theta'/`gamma'* /*
*/ (`kk'-exp(`xb')))
if `touse'
|
|
base/g/gsem.ado:
|
31 [+]
|
capture
drop
`GSEM'*
All properties
| key |
content |
| command |
drop |
| indent |
1 |
| parameters |
`GSEM'* |
| prefix |
capture |
|
|
base/g/gsem_p.ado:
|
8 [+]
|
capture
drop
`tname'*
All properties
| key |
content |
| command |
drop |
| indent |
1 |
| parameters |
`tname'* |
| prefix |
capture |
|
|
base/g/gsem_parse.ado:
|
256 [+]
|
capture
drop
`GSEM'*
All properties
| key |
content |
| command |
drop |
| indent |
1 |
| parameters |
`GSEM'* |
| prefix |
capture |
|
|
base/h/hadimvo.ado:
|
144 [+]
|
replace
`D'=(`r'-1)*`D'/`cf'
All properties
| key |
content |
| command |
replace |
| indent |
2 |
| parameters |
`D'=(`r'-1)*`D'/`cf' |
|
|
:
|
169 [+]
|
replace
`D'=(`r'-1)*`D'/`cf'
All properties
| key |
content |
| command |
replace |
| indent |
3 |
| parameters |
`D'=(`r'-1)*`D'/`cf' |
|
|
base/h/heck_d2.ado:
|
34 [+]
|
qui
gen
double `eta' = (`Is' + /*
*/ ($ML_y1-`Ir')*`rho'/`sig') / sqrt(1-`rho'^2)
|
|
:
|
59 [+]
|
qui
replace
`sc3' = /*
*/ cond(`y2',`M'*(`ym'*`rr'+`eta'*`rho'*`rr'^2)*`dlr',0)
|
|
base/h/heckma_p.ado:
|
209 [+]
|
label
var `varn' "E(`depname'*|Pr(`selname'))"
|
|
base/h/hereg.ado:
|
123 [+]
|
gen
`score' = (`Fakedv'-`predz')*`hess'
|
|
base/i/ipolate.ado:
|
61 [+]
|
by `touse' `by':
replace
`z'=`m'[_N]*`x'+`b'[_N] /*
*/
if `touse' & `ismiss'
|
|
:
|
72 [+]
|
by `touse' `by':
replace
`z'=`M'[_N]*`x'+`B'[_N] /*
*/
if `touse' & `ismiss'
|
|
base/i/ivpoisson.ado:
|
558 [+]
|
qui
replace
`normwt' = r(N)*`normwt'/r(sum)
|
|
base/i/ivregress.ado:
|
255 [+]
|
qui
replace
`normwt' = r(N)*`normwt'/r(sum)
if `touse'
|
|
base/i/ivregress_estat.ado:
|
1281 [+]
|
qui
replace
`normwt' = r(N)*`normwt' / r(sum)
|
|
base/k/kdensity.ado:
|
207 [+]
|
qui
replace
`m' = r(min)-`wwidth'+(_n-1)*`delta'
in 1/`n'
|
|
base/k/kdensity_7.ado:
|
128 [+]
|
qui
replace
`m' = r(min)-`wwidth'+(_n-1)*`delta'
in 1/`n'
|
|
:
|
178 [+]
|
qui
replace
`tden' = `tden'/(`ft'[_N]*`scale')
|
|
base/l/lfit.ado:
|
348 [+]
|
gen
double `qx' = cond(`m'==1, `dw'*`x'[1]/`w'[1],
cond((_n-1)*`dw'>=`w'[`m'-1],
`dw'*(`x'[`m']-`x'[`m'-1])/(`w'[`m']-`w'[`m'-1]),
(_n*`dw'-`w'[`m'-1])
+ `x'[`m'-1] ))
in 1/`group'
-
*(`x'[`m']-`x'[`m'-1])/(`w'[`m']-`w'[`m'-1])
gen double `qx' = cond(`m'==1, `dw'*`x'[1]/`w'[1],
cond((_n-1)*`dw'>=`w'[`m'-1],
`dw'*(`x'[`m']-`x'[`m'-1])/(`w'[`m']-`w'[`m'-1]),
(_n*`dw'-`w'[`m'-1])
+ `x'[`m'-1] ))
in 1/`group'
|
|
:
|
355 [+]
|
replace
`qx' = `qx' - `x'[`m'[_n-1]]
+ cond(`m'[_n-1]==1,
(`w'[1]-(_n-1)*`dw')*`x'[1]/`w'[1],
(`w'[`m'[_n-1]]-(_n-1)*`dw')
/(`w'[`m'[_n-1]]-`w'[`m'[_n-1]-1]) )
in 2/`group'
if `m'>1 & (_n-1)*`dw'<`w'[`m'-1]
-
*(`x'[`m'[_n-1]]-`x'[`m'[_n-1]-1])
replace `qx' = `qx' - `x'[`m'[_n-1]]
+ cond(`m'[_n-1]==1,
(`w'[1]-(_n-1)*`dw')*`x'[1]/`w'[1],
(`w'[`m'[_n-1]]-(_n-1)*`dw')
/(`w'[`m'[_n-1]]-`w'[`m'[_n-1]-1]) )
in 2/`group'
if `m'>1 & (_n-1)*`dw'<`w'[`m'-1]
|
|
base/l/lloghet_glf.ado:
|
42 [+]
|
replace
`g3' = -`a'*`th'*exp(-`c')*`f' + /*
*/ (`c'-`c0')/`th' + exp(-`c0')*`f0'
|
|
:
|
45 [+]
|
replace
`b' = (`b'-1)*`ga'/`b'
All properties
| key |
content |
| command |
replace |
| indent |
2 |
| parameters |
`b' = (`b'-1)*`ga'/`b' |
|
|
:
|
46 [+]
|
replace
`b0' = cond(`t0'>0,(`b0'-1)*`ga'/`b0',0)
|
|
:
|
55 [+]
|
replace
`g2' = -`a'*`th'*exp(-`c')*`b' + exp(-`c0')*`b0' + /*
*/ `d'*(`ga'*(`beta'-ln(`t'))-1-`b')
|
|
:
|
68 [+]
|
gen
double `h' = -`b'*`ga'* /*
*/ (-`b'*(`t'*exp(-`beta'))^(-`ga')+1)
if $ML_samp
|
|
:
|
70 [+]
|
gen
double `h0' = cond(`t0'>0,-`b0'*`ga'* /*
*/ (-`b0'*(`t0'*exp(-`beta'))^(-`ga')+1),0)
if $ML_samp
|
|
base/l/lloghet_glf_sh.ado:
|
64 [+]
|
gen
double `logst' = `iga'*( (1-1/`F')*`lntmu' - /*
*/ (1-1/`F0')*`lntmu0' )
|
|
base/l/lloghet_ilf.ado:
|
54 [+]
|
replace
`g1' = `ga'*(`f'*`c' - `f0'*`c0' + `d'* /*
*/ (`f'*(1+`th'*`c'*`c') - 1))
|
|
:
|
61 [+]
|
replace
`g2' = (`h0'*`c0' - `h'*`c')/`ga' - `d'* /*
*/ (1 + ln(`t')*`ga' - `beta'*`ga' + `h'/`ga'* /*
*/ (`th'*`c'*`c'+1))
|
|
base/l/lloghet_ilf_sh.ado:
|
67 [+]
|
gen
double `logst' = `iga'*((1-1/`F')*`lntmu' - /*
*/ (1-1/`F0')*`lntmu0' )
|
|
:
|
144 [+]
|
replace
`dz' = cond(`sumd'<., /*
*/ -(1/`c' - 1)*`ith'^2 + /*
*/ `c'*`sums'*(`a'*`sums' - `ith') , 0) /*
*/
if $ML_samp
|
|
base/l/lloghet_ip.ado:
|
137 [+]
|
gen
`vtyp' `varn'=exp(`xb')*`cc'
if `touse'
|
|
base/l/lnorm_lf.ado:
|
40 [+]
|
qui
replace
`w1'=`d'*( (1/`es')*`lntxb' - `R'/`es') /*
*/ + `R'/`es' - cond(`t0'>0, `R0'/`es', 0)
|
|
:
|
58 [+]
|
gen
double `f'=`d'*( (-1/`e2s') /*
*/ -(1/`e2s')*((`lntxb')*`net'*`et' /*
*/ -`net'*`net' )/(`et'*`et') ) /*
*/ +(1/`e2s')*((`lntxb')*`net'*`et' /*
*/ -`net'*`net' )/(`et'*`et')
|
|
:
|
70 [+]
|
replace
`f'=`d'*((-2/`es')*`lntxb' /*
*/ -(1/`es')* ( -`R'+ ((`lntxb'^2)*`net'*`et' /*
*/ -`net'*`net'*`lntxb')/(`et'*`et')) ) /*
*/ +(1/`es')* ( -`R'+ ((`lntxb'^2)*`net'*`et' /*
*/ -`net'*`net'*`lntxb')/(`et'*`et'))
|
|
:
|
76 [+]
|
replace
`f'=`f'-(1/`es')* ( -`R0'+ /*
*/ ((`lntxb0'^2)*`net0'*`et0' /*
*/ -`net0'*`net0'*`lntxb0')/(`et0'*`et0')) /*
*/
if `t0'>0
|
|
:
|
84 [+]
|
replace
`f'=`d'*( -2*(`lntxb'^2) /*
*/ -`lntxb'*( ( (`lntxb'^2)*`net'*`et' /*
*/ -`net'*`net'*`lntxb') /(`et'*`et')) /*
*/ +`lntxb'*`R' ) /*
*/ +`lntxb'*(( (`lntxb'^2)*`net'*`et' /*
*/ -`net'*`net'*`lntxb')/(`et'*`et')) /*
*/ -`lntxb'*`R'
|
|
:
|
91 [+]
|
replace
`f'=`f' /*
*/ -`lntxb0'*(((`lntxb0'^2)*`net0'*`et0' /*
*/ -`net0'*`net0'*`lntxb0') /(`et0'*`et0')) /*
*/ +`lntxb0'*`R0'
if `t0'>0
|
|
base/l/lnormhet_ilf.ado:
|
77 [+]
|
replace
`c' = `f'*(`c'-`th'*`h'*`h'*`f'*`f') - /*
*/ `d'*(-1+2*`th'*`th'*`h'*`h'*(`f'^4) + /*
*/ (1-`th'*`f'*`f')*`c')
|
|
base/l/lnormhet_ilf_sh.ado:
|
148 [+]
|
replace
`dz' = cond(`sumd'<., /*
*/ -(1/`c' - 1)*`ith'^2 + /*
*/ `c'*`sums'*(`a'*`sums' - `ith') , 0) /*
*/
if $ML_samp
|
|
base/l/logis_lf.ado:
|
33 [+]
|
qui
replace
`w1'=-(`d'*`g'-(1+`d')*`et'*`g'/(1+`et'))
|
|
:
|
40 [+]
|
qui
replace
`w2'=-(`d'*(`I'*`g' +1+`g'*log(`t')) /*
*/ -(1+`d')*`et'*(`I'+log(`t'))*`g'/(1+`et'))
|
|
:
|
42 [+]
|
qui
replace
`w2' =`w2' - `et0'*(`I'+log(`t0'))*`g'/(1+`et0') /*
*/
if `t0'> 0
|
|
:
|
71 [+]
|
qui
replace
`C'=`d'*`g'*(`xblnt') /*
*/ -(1+`d')*`et'*`g'*`xblnt'* /*
*/ ((`xblnt'*`g')+1+`et')/(1+`et')^2
|
|
base/l/logit_p.ado:
|
231 [+]
|
by `keep' `rhs':
gen
long `y'=cond(_n==_N, /*
*/ sum((`e(depvar)'!=0 & `e(depvar)'<.)*`w'), .)
|
|
:
|
258 [+]
|
replace
`s' = `m'*`p'*(1-`p')*`s'*`s'
if `keep'
|
|
base/l/logrank.ado:
|
258 [+]
|
gen
double `wi' = sum( `ni'*(`n'-`ni')*`cons' )
|
|
base/l/lowess.ado:
|
208 [+]
|
replace
`ys' = `ys'* r(mean)/`mean'
if `touse'
|
|
base/l/lowess_7.ado:
|
147 [+]
|
replace
`ys' = `ys'* r(mean)/`mean'
if `touse'
|
|
base/l/lpoly.ado:
|
284 [+]
|
qui
replace
`xgrid' = r(min) + (_n - 1)*`delta'
in 1/`n'
|
|
base/l/lpredict.ado:
|
89 [+]
|
by `keep' `rhs':
gen
long `y'=cond(_n==_N, /*
*/ sum((`l'!=0 & `l'!=.)*`w') ,.)
|
|
:
|
111 [+]
|
replace
`new'=`m'*`p'*(1-`p')*`rthat'*`rthat'
|
|
base/l/lsens_x.ado:
|
23 [+]
|
gen
double `sumy' = sum((`y'==0)*`w')
if `touse'
|
|
:
|
29 [+]
|
replace
`sumy' = sum((`y'!=0)*`w')
if `touse'
|
|
base/l/ltable.ado:
|
207 [+]
|
gen
`H' = 2*`fail'/((2-`fail')*`dI')
|
|
base/l/ltable_7.ado:
|
131 [+]
|
gen
`H' = 2*`fail'/((2-`fail')*`dI')
|
|
base/l/ltable_9.ado:
|
183 [+]
|
gen
`H' = 2*`fail'/((2-`fail')*`dI')
|
|
base/m/mdslong.ado:
|
363 [+]
|
gen
`j12' = cond(`j1'<`j2', (`j1'-1)*`n'+`j2', (`j2'-1)*`n'+`j1')
|
|
base/m/merge_10.ado:
|
198 [+]
|
qui
recode
`_merge'?* (1 .=0) (2/5=1)
All properties
| key |
content |
| command |
recode |
| indent |
3 |
| parameters |
`_merge'?* (1 .=0) (2/5=1) |
| prefix |
qui |
|
|
base/m/mfp_10.ado:
|
445 [+]
|
cap
drop
`stub`i''*
All properties
| key |
content |
| command |
drop |
| indent |
2 |
| parameters |
`stub`i''* |
| prefix |
cap |
|
|
base/m/mgarch_dvech_p.ado:
|
719 [+]
|
qui
predict
double `res'*
if `touse'
, residuals
|
|
base/m/mhodds.ado:
|
239 [+]
|
qui by `touse' `strata' `by':
gen
double `pt'= /*
*/ sum((`d'+`h')*`wt')
if `touse'
|
|
:
|
244 [+]
|
qui by `touse' `strata' `by':
gen
double `p1'= /*
*/ sum((`d'+`h')*`e'*`wt')
if `touse'
|
|
:
|
246 [+]
|
qui by `touse' `strata' `by':
gen
double `p2' = /*
*/ sum((`d'+`h')*`e'*`e'*`wt')
if `touse'
|
|
base/m/ml_5.ado:
|
401 [+]
|
gen
double `sumff' = sum(`ff'*$S_mlwgt)
|
|
:
|
623 [+]
|
qui
gen
double `fatS' = sum(`fmhi'*$S_mlwgt)
|
|
:
|
672 [+]
|
qui
replace
`fatS' = sum(`fmhi'*$S_mlwgt)
|
|
base/n/nbreg.ado:
|
543 [+]
|
qui
replace
`z' = lngamma(`y'+exp(`z')) - lngamma(`y'+1) /*
*/ - lngamma(exp(`z')) + `lndelta'*`y' - (`y'+exp(`z'))*`lnoned' `if'
|
|
base/n/nbreg_al.ado:
|
45 [+]
|
qui
replace
`g2' = `y' - (`y'+`m')*`delta'/(1+`delta') - `g1' /*
*/
if $ML_samp
|
|
base/n/newey.ado:
|
165 [+]
|
replace
`vt1' = `x'*`e'* /*
*/ l`j'.`e'*l`j'.`wvar'* /*
*/ `ow'
if `touse'
|
|
base/n/newey_7.ado:
|
116 [+]
|
replace
`vt1' = `x'[_n-`j']*`e'* /*
*/ `e'[_n-`j']*`wvar'[_n-`j']* /*
*/ `ow'
if `touse'
|
|
base/n/nl_p.ado:
|
211 [+]
|
qui
replace
`varlist' = `plow'*`lb' + /*
*/ (1-`plow')*`e' /*
*/ if !mi(`lb') & mi(`ub') & `touse'
|
|
:
|
214 [+]
|
qui
replace
`varlist' = `pmid'*`e' + /*
*/ (1-`pmid')*`ub' /*
*/ if mi(`lb') & !mi(`ub') & `touse'
|
|
:
|
217 [+]
|
qui
replace
`varlist' = `plow' * `lb' + /*
*/ `pmid'*`e' + (1-`plow'-`pmid')*`ub' /*
*/ if !mi(`lb') & !mi(`ub') & `touse'
|
|
base/n/nlog_rd.ado:
|
110 [+]
|
qui
replace
`di' = /*
*/ (${ML_y`m'} - `p`j''*${ML_y`k'})
if `touse'
|
|
:
|
223 [+]
|
qui
replace
`ck' = cond($ML_y1,`Ij'* ///
(cond(${ML_y`l2'}==`jlev',1,0)+`dldtj'),0)
-
qui replace `ck' = cond($ML_y1,`Ij'* ///
(cond(${ML_y`l2'}==`jlev',1,0)+`dldtj'),0)
|
|
base/n/nlsur.ado:
|
493 [+]
|
qui
replace
`normwt' = r(N)*`normwt'/r(sum)
|
|
base/o/orthog.ado:
|
72 [+]
|
replace
`x`j'' = `x`j'' - r(mean)*`x`i''
|
|
:
|
100 [+]
|
replace
`x`j'' = `x`j'' - r(mean)*`x`i''
|
|
base/o/orthpoly.ado:
|
66 [+]
|
gen
double `q`i'' = (`a'*`x' + `b')*`q`j'' /*
*/ - `c'*`q`k''
if `doit'
|
|
base/p/probit_p.ado:
|
180 [+]
|
by `keep' `uorhs':
gen
long `y'=cond(_n==_N, /*
*/ sum((`e(depvar)'!=0 & `e(depvar)'<.)*`w'), .)
|
|
base/q/qreg_c.ado:
|
32 [+]
|
qui
replace
`r'=cond(`r'>=0,`quant',`quant'-1)*`r'
|
|
base/q/quantile.ado:
|
25 [+]
|
gen
`LINE'=`QUANT'[1] + `CNT'* /*
*/ ((`QUANT'[`CNT'[_N]]-`QUANT'[1])/`CNT'[_N])
|
|
base/q/quantile_7.ado:
|
11 [+]
|
gen
`LINE'=`QUANT'[1] + `CNT'* /*
*/ ((`QUANT'[`CNT'[_N]]-`QUANT'[1])/`CNT'[_N])
|
|
base/r/regre_p2.ado:
|
126 [+]
|
replace
`Y' = `p'*`E' + (1-`p')*`lb' /*
*/
if `touse' & `lb'!=. & `ub'==.
|
|
:
|
128 [+]
|
replace
`Y' = `p'*`E' + (1-`p')*`ub' /*
*/
if `touse' & `lb'==. & `ub'!=.
|
|
:
|
130 [+]
|
replace
`Y' = `p'*`E' + `p2'*`lb' + (1-`p'-`p2')*`ub' /*
*/
if `touse' & `lb'!=. & `ub'!=.
|
|
base/r/regres_p.ado:
|
250 [+]
|
gen
`type' `newvar'=`RSTU'*`RES'/sqrt((1-`HAT')*`SRES'[_N])
|
|
base/r/rocreg_p.ado:
|
407 [+]
|
qui
replace
`intercept_`varit'' = ///
`bmat'[1,`icr']*`ivar'+
|
|
base/r/rocregstat.ado:
|
342 [+]
|
qui
gen
double `roc_`vvit''= ///
`eb'[1,`ic'] + ///
`eb'[1,`sc']*`lirc'
|
|
base/r/roctab.ado:
|
615 [+]
|
by `touse' `C':
gen
`row1' = sum(`touse'*(1-`D')*`wv')
|
|
:
|
628 [+]
|
gen
`row6' = `row3'*(`row4'*(`row4'+`row1')+(1/3)*`row1'^2)
if `touse'
|
|
:
|
631 [+]
|
gen
`row7' = `row1'*(`row2'*(`row2'+`row3')+(1/3)*`row3'^2)
if `touse'
|
|
base/r/roctab_7.ado:
|
499 [+]
|
by `touse' `C':
gen
`row1' = sum(`touse'*(1-`D')*`wv')
|
|
:
|
512 [+]
|
gen
`row6' = `row3'*(`row4'*(`row4'+`row1')+(1/3)*`row1'^2)
if `touse'
|
|
:
|
515 [+]
|
gen
`row7' = `row1'*(`row2'*(`row2'+`row3')+(1/3)*`row3'^2)
if `touse'
|
|
base/r/rologit_p.ado:
|
94 [+]
|
gen
`vtyp' `varn' = `p'*(1-`p')*`b'
if `touse'
|
|
base/r/rreg.ado:
|
182 [+]
|
replace
`y'= `y' + /*
*/ (`lambda'*`scale'/`aa')*(`res'/`scale')*`weight' /*
*/
if `touse'
|
|
base/s/sample.ado:
|
89 [+]
|
by `by':
replace
`N'=int(`N'[_N]*`exp'/100+.5)
|
|
base/s/sem.ado:
|
81 [+]
|
capture
drop
`SEM'*
All properties
| key |
content |
| command |
drop |
| indent |
2 |
| parameters |
`SEM'* |
| prefix |
capture |
|
|
base/s/slogit_d2.ado:
|
31 [+]
|
replace
`p`i'' = `p`i'' - el(`phi`dm'',1,`i')*`xb`dm''
|
|
base/s/stmh.ado:
|
193 [+]
|
by `str' `by':
gen
double `d1' = /*
*/ sum(`wt'*_d *`e')
|
|
:
|
204 [+]
|
gen
double `d1' = sum(`wt'*_d *`e')
|
|
base/s/stphtest.ado:
|
229 [+]
|
gen
double `wrk' = sum(cond(e(sample), /*
*/ (`rnk'-`rvar')*``i'', 0))
|
|
:
|
265 [+]
|
gen
double `gnum' = sum(cond(e(sample), /*
*/ (`rnk'-`rvar')*``i'',0))
|
|
base/s/stphtest_7.ado:
|
205 [+]
|
gen
double `wrk' = sum(cond(e(sample), /*
*/ (`rnk'-`rvar')*``i'', 0))
|
|
:
|
241 [+]
|
gen
double `gnum' = sum(cond(e(sample), /*
*/ (`rnk'-`rvar')*``i'',0))
|
|
base/s/suest.ado:
|
184 [+]
|
capture
predict
double `sci'*
if `esamp'
, score
|
|
base/s/svygen.ado:
|
78 [+]
|
quietly by `by' :
replace
`wgt' = (_n==1)*`postwt'
|
|
base/s/svytab.ado:
|
771 [+]
|
gen
double `x' = ($S_VYexp)*`y'
|
|
:
|
1438 [+]
|
gen
double `xc' = e(total)*`bij'
in 1/`ncat'
|
|
:
|
1441 [+]
|
replace
`xc' = e(total)*`matr'[1,_n-`Nr1'+1] /*
*/
in `Nr1'/`Nr2'
|
|
:
|
1443 [+]
|
replace
`xc' = e(total)*`matc'[1,_n-`Nc1'+1] /*
*/
in `Nc1'/`Nc2'
|
|
:
|
1527 [+]
|
replace
`xse' = `porp'* /*
*/ sqrt(`V'[_n-`Nr1'+1, /*
*/ _n-`Nr1'+1])
in `Nr1'/`Nr2'
|
|
:
|
1533 [+]
|
replace
`xse' = `porp'* /*
*/ sqrt(`V'[_n-`Nc1'+1, /*
*/ _n-`Nc1'+1])
in `Nc1'/`Nc2'
|
|
base/s/svytab_7.ado:
|
759 [+]
|
gen
double `x' = ($S_VYexp)*`y'
|
|
:
|
1349 [+]
|
gen
double `xc' = e(total)*`bij'
in 1/`ncat'
|
|
:
|
1352 [+]
|
replace
`xc' = e(total)*`matr'[1,_n-`Nr1'+1] /*
*/
in `Nr1'/`Nr2'
|
|
:
|
1354 [+]
|
replace
`xc' = e(total)*`matc'[1,_n-`Nc1'+1] /*
*/
in `Nc1'/`Nc2'
|
|
:
|
1436 [+]
|
replace
`xse' = `porp'* /*
*/ sqrt(`V'[_n-`Nr1'+1, /*
*/ _n-`Nr1'+1])
in `Nr1'/`Nr2'
|
|
:
|
1442 [+]
|
replace
`xse' = `porp'* /*
*/ sqrt(`V'[_n-`Nc1'+1, /*
*/ _n-`Nc1'+1])
in `Nc1'/`Nc2'
|
|
base/t/tnbreg.ado:
|
650 [+]
|
qui
replace
`z' = lngamma(`y'+exp(`z')) - lngamma(`y'+1) /*
*/ - lngamma(exp(`z')) + `lndelta'*`y' - (`y'+exp(`z'))*`lnoned' /*
*/ - ln(nbinomialtail(exp(`z'),$ztnb_tp+1,(1+exp(`mudelta')) )) `if'
|
|
base/t/tnbreg_cons.ado:
|
114 [+]
|
qui
gen
double `f2' = `y' -(`y'+`m')*`delta'/
All properties
| key |
content |
| command |
gen |
| comment |
///
(1+`delta') - `z2' if $ML_samp |
| indent |
2 |
| parameters |
double `f2' = `y' -(`y'+`m')*`delta'/ |
| prefix |
qui |
|
|
base/t/tnbreg_mean.ado:
|
160 [+]
|
qui
gen
double `z3' = cond($ML_samp & `tp'==0, ///
-`p'^(`m'+1)*`mu'/ `z2', ///
cond($ML_samp & `tp'>0, ///
-(`x3'-`x2')/(2*`h2'), .))
-
qui gen double `z3' = cond($ML_samp & `tp'==0, ///
-`p'^(`m'+1)*`mu'/ `z2', ///
cond($ML_samp & `tp'>0, ///
-(`x3'-`x2')/(2*`h2'), .))
|
|
base/t/treatr_p.ado:
|
157 [+]
|
gen
`vtyp' `varn' = `Xb'- `trtname'*[`depname']_b[`trtname'] /*
*/ + [`depname']_b[`trtname'] + (normd(`Xbprb') / /*
*/ normprob(`Xbprb')) * `sigma' * `rho'
|
|
:
|
166 [+]
|
gen
`vtyp' `varn' = `Xb'- `trtname'*[`depname']_b[`trtname'] /*
*/ - (normd(`Xbprb')/normprob(-`Xbprb')) /*
*/ * `sigma' * `rho'
|
|
base/t/trnb_cons.ado:
|
48 [+]
|
qui
replace
`g1' = `z2'-(1+`delta')^(-`m')*`lnoned'*`m' /*
*/ / `z3'
if $ML_samp
|
|
:
|
51 [+]
|
qui
replace
`g2' = `y' -(`y'+`m')*`delta'/(1+`delta') - `z2' /*
*/ + (1+ `delta')^(-`m')*(`m'*ln(1+`delta') /*
*/ -`mu'/(1+`delta') )/ `z3'
if $ML_samp
|
|
base/t/trnb_mean.ado:
|
45 [+]
|
replace
`sc1' = `p'*(`y'-`mu') - /*
*/ `p'^(`m'+1)*`mu'/ `z2'
if $ML_samp
|
|
base/u/u_mi_impute_fv2var.ado:
|
11 [+]
|
cap
drop
`fvstub'*
All properties
| key |
content |
| command |
drop |
| indent |
2 |
| parameters |
`fvstub'* |
| prefix |
cap |
|
|
base/w/weib1_lf.ado:
|
38 [+]
|
replace
`g2' = /*
*/ `p'*(((`xb'-`lnt')*`eplnt' - (`xb'-`lnt0')*`eplnt0') /*
*/ + `d'*((`lnt'-`xb' + 1/`p')))
|
|
base/w/weibhet_glfa.ado:
|
25 [+]
|
gen
double `b' = exp(-`beta'*`p')*`t'^`p'
if $ML_samp
|
|
:
|
26 [+]
|
gen
double `b0' = cond(`t0'>0, exp(-`beta'*`p')*`t0'^`p',0) /*
*/
if $ML_samp
|
|
base/w/weibhet_gp.ado:
|
180 [+]
|
qui
gen
double `kk' = exp(`xb')*`t'^(`auxp'-1) /*
*/
if `touse'
|
|
:
|
195 [+]
|
qui
gen
double `ff'= 1+`theta'*exp(`xb')*`t'^`auxp' /*
*/
if `touse'
|
|
:
|
197 [+]
|
qui
gen
double `ff0'= 1+`theta'*exp(`xb')*`t0'^`auxp' /*
*/
if `t0'>0 & `touse'
|
|
:
|
226 [+]
|
qui
gen
double `ff'= /*
*/ (`d'!=0)-(1/`theta')* /*
*/ ln(1+`theta'*exp(`xb')*`t'^`auxp')
if `touse'
|
|
:
|
229 [+]
|
qui
replace
/*
*/ `ff'=`ff'+(1/`theta')* /*
*/ ln(1+`theta'*exp(`xb')*`t0'^`auxp') /*
*/
if `t0'>0 & `touse'
|
|
base/w/weibhet_ilf.ado:
|
26 [+]
|
gen
double `b' = exp(`beta')*`t'^`p'
if $ML_samp
|
|
:
|
27 [+]
|
gen
double `b0' = cond(`t0'>0, exp(`beta')*`t0'^`p',0) /*
*/
if $ML_samp
|
|
:
|
41 [+]
|
replace
`g1' = -`f' + `f0' + `d'* /*
*/ (1 - `th'*`f'/`c')
All properties
| key |
content |
| command |
replace |
| indent |
2 |
| parameters |
`g1' = -`f' + `f0' + `d'* /*
*/ (1 - `th'*`f'/`c') |
|
|
:
|
43 [+]
|
replace
`g2' = (-`f'*`lnt' + `f0'*`lnt0' + `d'*`lnt'* /*
*/ (1-`th'*`f'/`c'))*`p' + `d'
|
|
base/w/weibhet_ilf_sh.ado:
|
128 [+]
|
replace
`dz' = cond(`sumd'!=., /*
*/ -(1/`c' - 1)*`ith'^2 + /*
*/ `c'*`sums'*(`a'*`sums' - `ith') , 0) /*
*/
if $ML_samp
|
|
base/w/weibhet_ilfa_sh.ado:
|
136 [+]
|
replace
`dz' = cond(`sumd'!=., /*
*/ -(1/`c' - 1)*`ith'^2 + /*
*/ `c'*`sums'*(`a'*`sums' - `ith') , 0) /*
*/
if $ML_samp
|
|
base/w/weibhet_ip.ado:
|
183 [+]
|
qui
gen
double `kk' = exp(`xb')*`t'^(`auxp'-1)
if `touse'
|
|
:
|
197 [+]
|
qui
gen
double `ff'= 1+2*`theta'*exp(`xb')*`t'^`auxp' /*
*/
if `touse'
|
|
:
|
199 [+]
|
qui
gen
double `ff0'= 1+2*`theta'*exp(`xb')*`t0'^`auxp' /*
*/
if `t0'>0 & `touse'
|
|
:
|
228 [+]
|
qui
gen
double `ff'= /*
*/ (`d'!=0)+(1/`theta')* /*
*/ (1-sqrt(1+2*`theta'*exp(`xb')*`t'^`auxp'))
if `touse'
|
|
:
|
231 [+]
|
qui
replace
/*
*/ `ff'=`ff'-(1/`theta')* /*
*/ (1-sqrt(1+2*`theta'*exp(`xb')*`t0'^`auxp')) /*
*/
if `t0'>0 & `touse'
|
|
base/w/weibul_p.ado:
|
237 [+]
|
gen
`vtyp' `varn' = /*
*/ exp( -exp(`rgn'*`xb')* `t'^`aux_p' ) / /*
*/ exp( -exp(`rgn'*`xb')*`t0'^`aux_p' )
if `touse'
|
|
base/w/wntestb_7.ado:
|
297 [+]
|
gen
int `mapy' = ($S_GPH_ay)*`y' + ($S_GPH_by)
|
|
:
|
298 [+]
|
gen
int `mapx' = ($S_GPH_ax)*`x' + ($S_GPH_bx)
|
|
:
|
315 [+]
|
gen
int `mapy1'=($S_GPH_ay)*`inarg' + ($S_GPH_by)
|
|
:
|
317 [+]
|
gen
int `mapx1'=($S_GPH_ax)*`inarg' + ($S_GPH_bx)
|
|
:
|
333 [+]
|
replace
`mapy2'=($S_GPH_ay)*`inarg' + ($S_GPH_by)
|
|
:
|
336 [+]
|
replace
`mapx2'=($S_GPH_ax)*`inarg' + ($S_GPH_bx)
|
|
:
|
396 [+]
|
gen
int `mapy' = ($S_GPH_ay)*`y' + ($S_GPH_by)
|
|
:
|
397 [+]
|
gen
int `mapx' = ($S_GPH_ax)*`x' + ($S_GPH_bx)
|
|
:
|
489 [+]
|
gen
int `mapy' = ($S_GPH_ay)*`y' + ($S_GPH_by)
|
|
:
|
490 [+]
|
gen
int `mapx' = ($S_GPH_ax)*`x' + ($S_GPH_bx)
|
|
base/x/xi.ado:
|
423 [+]
|
label
var `stub'`num1' "(`lbl1')*`part2'"
|
|
base/x/xi_6.ado:
|
215 [+]
|
label
var `stub'`num1' "(`lbl1')*`part2'"
|
|
base/x/xtcloglog.ado:
|
420 [+]
|
gen
double `logFc' = log((`sn'==1) -`sn'* exp(-exp(`xb')))
if `touse'
|
|
base/x/xtgee.ado:
|
1564 [+]
|
replace
`dj' = 2*(`y'*ln(`y'/`mu')-(1+`k'*`y')/`k'* /*
*/ ln((1+`k'*`y')/(1+`k'*`mu')))
if `y'
|
|
:
|
1666 [+]
|
replace
`dj' = 2*(`y'*ln(`y'/`mu')-(1+`k'*`y')/`k'* /*
*/ ln((1+`k'*`y')/(1+`k'*`mu')))
if `y'
|
|
base/x/xtgee_p.ado:
|
229 [+]
|
qui
replace
`xb' = (`e(power)'*`xb'+1)^(1/`e(power)') /*
*/
if `touse'
|
|
base/x/xtgee_plink.ado:
|
42 [+]
|
replace
`m' = (`m'/`N'*.9999)*`N'
All properties
| key |
content |
| command |
replace |
| indent |
3 |
| parameters |
`m' = (`m'/`N'*.9999)*`N' |
|
|
base/x/xtgls.ado:
|
681 [+]
|
gen
double ${X_ee}`i' = $X_ee[`b0'+_n]
in 1/$X_nt
|
|
base/x/xtregar.ado:
|
308 [+]
|
qui by `id':
gen
`tvar'=(sqrt(1-`rho'^2))*`x'
if _n==1
|
|
:
|
554 [+]
|
replace
`g_i'=sqrt(1-`rho'^2)*`g_i'
|
|
:
|
1143 [+]
|
by `id':
gen
double `zresLD'=(`zres'-`zres'[_n-1]*`Itj')^2
|
|
base/x/xtsf_ll.ado:
|
76 [+]
|
gen
double `denom' = sqrt(`gamma'*(1-`gamma')*`sigmaS2' /*
*/ *(1+(`eta2'-1)*`gamma'))
if $ML_samp
|
|
:
|
83 [+]
|
gen
double `f' = -1/2*`T'*(ln(2*_pi)+ln(`sigmaS2')) /*
*/ - 1/2*(`T'-1)*ln(1-`gamma') /*
*/ - 1/2*ln(1+(`eta2'-1)*`gamma') /*
*/ - ln(normprob(`z')) - 1/2*`z'^2 /*
*/ + ln(normprob(`zi')) /*
*/ + 1/2*`zi'^2 /*
*/ - 1/2*(`e2'/((1-`gamma')*`sigmaS2'))
|
|
:
|
143 [+]
|
gen
double `dne' = /*
*/ `sigmaS2'*(`gamma'-`gamma'^2)*`gamma'*`deta2'
|
|
:
|
151 [+]
|
gen
double `dzgamma' = -(`mu'+$S_COST*`eta_e')/`denom' /*
*/ - 0.5*(`mu'*(1-`gamma')-$S_COST*`gamma'*`eta_e') /*
*/ *`dng'/(`denom'^3)
|
|
:
|
157 [+]
|
gen
double `dzeta' = -$S_COST*`gamma'*`deta_e'/`denom' /*
*/ - (`mu'*(1-`gamma')-$S_COST*`gamma'*`eta_e')*0.5 /*
*/ *`dne'/`denom'^3
|
|
base/x/xtsf_llti.ado:
|
71 [+]
|
gen
double `denom' = sqrt(`gamma'*(1-`gamma')*`sigmaS2' /*
*/ *(1+(`eta2'-1)*`gamma'))
if $ML_samp
|
|
:
|
78 [+]
|
gen
double `f' = -1/2*`T'*(ln(2*_pi)+ln(`sigmaS2')) /*
*/ - 1/2*(`T'-1)*ln(1-`gamma') /*
*/ - 1/2*ln(1+(`eta2'-1)*`gamma') /*
*/ - ln(normprob(`z')) - 1/2*`z'^2 /*
*/ + ln(normprob(`zi')) /*
*/ + 1/2*`zi'^2 /*
*/ - 1/2*(`e2'/((1-`gamma')*`sigmaS2'))
if $ML_samp
|
|
:
|
131 [+]
|
gen
double `dzgamma' = -(`mu'+$S_COST*`eta_e')/`denom' /*
*/ - 0.5*(`mu'*(1-`gamma')-$S_COST*`gamma'*`eta_e') /*
*/ *`dng'/(`denom'^3)
|
|
base/z/zinb_llf.ado:
|
39 [+]
|
qui
gen
double `fz' = exp(`zg')*`f1'*`f1'
if $ML_samp
|
|
:
|
71 [+]
|
qui
replace
`ttt' = cond(`y' == 0,
(-`f1'*`mu'*`p'^(`m'+1)*
(`alpha'*`mu'*(`m'+1)*`p'-1))/`f2' +
`sc1'*`sc1',
`alpha'*`mu'*`p'^2*(`y'-`mu')+`mu'*`p' )
if $ML_samp
|
|
:
|
84 [+]
|
qui
replace
`ttt' = cond(`y' == 0,
(-`f1'*`mu'*`p'^(`m'+1)*((`m'+1)*`mu'*`p'+
`m'*`m'*ln(`p')))/`f2' +
`f1'*`f1'*`mu'*`p'^(2*`m'+1)*(`m'*`mu'*`p'+
`m'*`m'*ln(`p'))/(`f2'*`f2'),
`mu'*`p'^2*(`y'-`mu') )
if $ML_samp
-
qui replace `ttt' = cond(`y' == 0,
(-`f1'*`mu'*`p'^(`m'+1)*((`m'+1)*`mu'*`p'+
`m'*`m'*ln(`p')))/`f2' +
`f1'*`f1'*`mu'*`p'^(2*`m'+1)*(`m'*`mu'*`p'+
`m'*`m'*ln(`p'))/(`f2'*`f2'),
`mu'*`p'^2*(`y'-`mu') ) if $ML_samp
|
|
:
|
93 [+]
|
qui
replace
`ttt' = cond(`y' == 0 ,
-(1-exp(`zg'))*`f1'*`fz'*(1-`p'^`m') / `f2' +
(`fz'*(1-`p'^`m') / `f2')^2 ,
(1-exp(`zg'))*`f1'*`fz'/`f1' + (`fz'/`f1')^2)
if $ML_samp
|
|
:
|
99 [+]
|
qui
replace
`ttt' = cond(`y' == 0,
-`fz'/`f2'*(1+(1-`p'^`m')*`f1'/`f2')*
`p'^`m'*(`m'*`m'*ln(`p')+`m'*`mu'*`p'),
0 )
if $ML_samp
|
|
base/z/zinb_plf.ado:
|
70 [+]
|
qui
replace
`ttt' = cond(`y' == 0,
(-`f1'*`mu'*`p'^(`m'+1)*
(`alpha'*`mu'*(`m'+1)*`p'-1))/`f2' +
`sc1'*`sc1',
`alpha'*`mu'*`p'^2*(`y'-`mu')+`mu'*`p' )
if $ML_samp
|
|
:
|
77 [+]
|
qui
replace
`ttt' = cond(`y' == 0,
-normd(`zg')*`mu'*`p'^(`m'+1) / `f2' -
`f1'*`mu'*`p'^(`m'+1)*normd(`zg')*(1-`p'^`m') / (`f2'*`f2') ,
0 )
if $ML_samp
|
|
:
|
83 [+]
|
qui
replace
`ttt' = cond(`y' == 0,
(-`f1'*`mu'*`p'^(`m'+1)*((`m'+1)*`mu'*`p'+
`m'*`m'*ln(`p')))/`f2' +
`f1'*`f1'*`mu'*`p'^(2*`m'+1)*(`m'*`mu'*`p'+
`m'*`m'*ln(`p'))/(`f2'*`f2'),
`mu'*`p'^2*(`y'-`mu') )
if $ML_samp
-
qui replace `ttt' = cond(`y' == 0,
(-`f1'*`mu'*`p'^(`m'+1)*((`m'+1)*`mu'*`p'+
`m'*`m'*ln(`p')))/`f2' +
`f1'*`f1'*`mu'*`p'^(2*`m'+1)*(`m'*`mu'*`p'+
`m'*`m'*ln(`p'))/(`f2'*`f2'),
`mu'*`p'^2*(`y'-`mu') ) if $ML_samp
|
|
:
|
98 [+]
|
qui
replace
`ttt' = cond(`y' == 0,
-normd(`zg')/`f2'*(1+(1-`p'^`m')*`f1'/`f2')*
`p'^`m'*(`m'*`m'*ln(`p')+`m'*`mu'*`p'),
0 )
if $ML_samp
|
|
base/z/zip.ado:
|
375 [+]
|
replace
`prhat'=(1-`psihat')*(exp(-1*`muhat') /*
*/ *`muhat'^`dep')/exp(lnfact(`dep')) /*
*/
if `dep'>0 & `dep'<. & `touse'
|
|
base/z/zip_llf.ado:
|
27 [+]
|
qui
gen
double `fz' = exp(`zg')*`f1'*`f1'
if $ML_samp
|
|
:
|
58 [+]
|
qui
replace
`ttt' = cond($ML_y1 == 0,
-`fz'*`lambda'*exp(-`lambda') / `f2' -
`fz'*(1-exp(-`lambda'))*`f1'*
`lambda'*exp(-`lambda') / `f2'^2,
0)
if $ML_samp
|
|
:
|
66 [+]
|
qui
replace
`ttt' = cond($ML_y1 == 0 ,
-(1-exp(`zg'))*`f1'*`fz'*(1-exp(-`lambda')) / `f2' +
(`fz'*(1-exp(-`lambda')) / `f2')^2 ,
(1-exp(`zg'))*`f1'*`fz'/`f1' + (`fz'/`f1')^2)
if $ML_samp
|
|
base/z/zip_plf.ado:
|
58 [+]
|
qui
replace
`ttt' = cond($ML_y1 == 0,
-normd(`zg')*`lambda'*exp(-`lambda') / `f2' -
normd(`zg')*(1-exp(-`lambda'))*`f1'*
`lambda'*exp(-`lambda') / `f2'^2,
0)
if $ML_samp
|
|
base/z/ztnb.ado:
|
501 [+]
|
qui
replace
`z' = lngamma(`y'+exp(`z')) - lngamma(`y'+1) /*
*/ - lngamma(exp(`z')) + `lndelta'*`y' - (`y'+exp(`z'))*`lnoned' /*
*/ - ln(1-(1+exp(-`lndelta'*`mudelta'))) `if'
|
-
-
Script Output
high: High price Number of Observations
----------------- ------------------------------
Total Integers Nonintegers
| # Negative - - -
| # Zero - - -
| # # Positive 248 2 246
| # # # ----- ----- -----
| # # # # Total 248 2 246
| . # # # # Missing -
+---------------------- -----
984.54 1383.37 248
(More than 99 unique values)
Variable | Obs Mean Std. Dev. Min Max
-------------+--------------------------------------------------------
high | 248 1204.044 86.53465 984.54 1383.37
@mean 1204.044
@sd 86.535
@min 984.540
@max 1383.370
@example0 1320.28
@histh .00030331, .00060661, .00090992, .00197149, .00197149, .00318472, .00530786, .00409464, .00394298, .00333637, .00470125, .00181984, .00151653, .00242645, .00151653
@histw 997.83429, 1024.423, 1051.0116, 1077.6003, 1104.189, 1130.7777, 1157.3663, 1183.955, 1210.5437, 1237.1323, 1263.7209, 1290.3097, 1316.8983, 1343.4869, 1370.0757
@type float
@label High price
@class other
@N_unique .
@N 248
|
[+]
low
@sp500.dta |
|
other
(float)
|
248
(.)
|
(x̄=1183.334, 87.476) [944.750,1364.660] |
Low price
|
All properties
| key |
content |
| N |
248 |
| N_unique |
. |
| class |
other |
| example0 |
1276.05 |
| histh |
.00028808, .00057616, .00043212, .00129636, .00259272, .0014404, .00518544, .00475332, .00302484, .00446524, .00388908, .00259272, .00158444, .00187252, .00172848 |
| histw |
958.74701, 986.74103, 1014.735, 1042.729, 1070.723, 1098.717, 1126.7111, 1154.7051, 1182.699, 1210.693, 1238.687, 1266.681, 1294.675, 1322.6691, 1350.6631 |
| label |
Low price |
| max |
1364.660 |
| mean |
1183.334 |
| min |
944.750 |
| sd |
87.476 |
| type |
float |
Data Manipulations with low
| file |
# |
command |
|
base/a/arch.ado:
|
552 [+]
|
qui
gen
double `wt_e2' = .7^(`timevar'-r(tmin))*$Te2 /*
*/
if `touse'
|
|
:
|
1131 [+]
|
qui
gen
double $Te_tarch = ($Te > 0)*$Te2
|
|
base/a/arch_dr.ado:
|
86 [+]
|
qui
gen
double `wt_e2' = /*
*/ .7^($Ttimevar-$Ttimemin)*$Te2 /*
*/
if $ML_samp
|
|
:
|
208 [+]
|
qui
gen
double `wt_e2' = /*
*/ .7^($Ttimevar-$Ttimemin)*$Te2
if $ML_samp
|
|
base/b/boxcox_p.ado:
|
80 [+]
|
gen
`vtyp' `varn' = (e(L)*`xb'+1)^(1/e(L)) /*
*/
if `touse'
|
|
base/b/bsample.ado:
|
168 [+]
|
gen
`r' = int(uniform()*`nmax' + 1)
|
|
:
|
357 [+]
|
gen
double `r' = int(uniform()*`nclust' + 1)
in 1/`nclust'
|
|
:
|
539 [+]
|
by `strata' `clid' `obsid':
replace
`r' = (`clid'-1)*`nclust'+_n-1
|
|
:
|
574 [+]
|
by `strata' `clid' `obsid':
replace
`r' = (`clid'-1)*`nclust'+_n-1
|
|
base/b/bsample_7.ado:
|
99 [+]
|
gen
double `r' = int(uniform()*`nclust' + 1)
in 1/`nclust'
|
|
:
|
115 [+]
|
by `clid' `obsid':
replace
`r' = (`clid'-1)*`nclust'+_n-1
|
|
base/c/clogit.ado:
|
654 [+]
|
qui by `touse' `group':
gen
double `i' = (_n==1&`touse')*`freq'
|
|
base/c/cluster.ado:
|
2291 [+]
|
qui by `tousevar' :
gen
long `grpvar' = /*
*/ int(((_n-1)/_N)*`k') + 1
if `tousevar'
|
|
:
|
2391 [+]
|
qui
replace
`var'=uniform()*`vrange'+`vmin' /*
*/
in `Np1'/`newN'
|
|
base/c/cluster_tree_8.ado:
|
905 [+]
|
qui
gen
double `cind' = `lbuf' + (`ncols'-`rbuf'-`lbuf')*`atx'/`maxx' /*
*/
if `atx' < .
|
|
base/c/cusum.ado:
|
44 [+]
|
replace
`x' = `x'+uniform()*`jx'
-
/*
To avoid ties and ensure a unique sort order for x,
randomly jitter x by .00001 times its range using a fixed seed
Answer: No, setting the seed screws up Monte Carlo experiments.
*/
replace `x' = `x'+uniform()*`jx'
|
|
base/c/cusum_7.ado:
|
27 [+]
|
replace
`x' = `x'+uniform()*`jx'
-
/*
To avoid ties and ensure a unique sort order for x,
randomly jitter x by .00001 times its range using a fixed seed
Answer: No, setting the seed screws up Monte Carlo experiments.
*/
replace `x' = `x'+uniform()*`jx'
|
|
base/d/dfgls.ado:
|
126 [+]
|
gen
double `dty'=`varlist'-_b[`iota']-_b[`qdtrd']*`trd'
|
|
base/d/dvech_p.ado:
|
700 [+]
|
qui
predict
double `res'*
if `touse'
, residuals
|
|
base/e/ereg.ado:
|
172 [+]
|
gen
double `lnf' = `wv' * ///
(`d'*`cons'-exp(`cons')*`realt')
|
|
base/e/ereg_lf.ado:
|
13 [+]
|
quietly
replace
`g1' = $ML_y2-exp(`I')*$ML_y1
|
|
base/e/ereg_p.ado:
|
348 [+]
|
gen
`typlist' `varlist' = `minus'(`d'-exp(`minus'`I')*`t')
if `touse'
|
|
base/e/ereghet_glf.ado:
|
22 [+]
|
gen
double `b' = exp(`beta')*`t'
if $ML_samp
|
|
:
|
23 [+]
|
gen
double `b0' = cond(`t0'>0, exp(`beta')*`t0',0) /*
*/
if $ML_samp
|
|
base/e/ereghet_gp.ado:
|
206 [+]
|
qui
gen
double `ff'= 1+`theta'*exp(`xb')*`t'
if `touse'
|
|
:
|
207 [+]
|
qui
gen
double `ff0'= 1+`theta'*exp(`xb')*`t0' /*
*/
if `t0'>0 & `touse'
|
|
:
|
236 [+]
|
qui
gen
double `ff'= /*
*/ (`d'!=0)-(1/`theta')* /*
*/ ln(1+`theta'*exp(`xb')*`t')
if `touse'
|
|
:
|
239 [+]
|
qui
replace
/*
*/ `ff'=`ff'+(1/`theta')* /*
*/ ln(1+`theta'*exp(`xb')*`t0') /*
*/
if `t0'>0 & `touse'
|
|
base/e/ereghet_ilf.ado:
|
21 [+]
|
gen
double `b' = exp(`beta')*`t'
if $ML_samp
|
|
:
|
22 [+]
|
gen
double `b0' = cond(`t0'>0, exp(`beta')*`t0',0) /*
*/
if $ML_samp
|
|
:
|
53 [+]
|
gen
double `dt' = `th'*(`f'*`f'/`c' - cond(`t0'>0, /*
*/ `f0'*`f0'/`c0',0) - `d'*`f'/`c'* /*
*/ (1-2*`th'*`f'/`c'))
|
|
base/e/ereghet_ilf_sh.ado:
|
97 [+]
|
replace
`dz' = cond(`sumd'<., /*
*/ -(1/`c' - 1)*`ith'^2 + /*
*/ `c'*`sums'*(`a'*`sums' - `ith') , 0) /*
*/
if $ML_samp
|
|
base/e/ereghet_ip.ado:
|
206 [+]
|
qui
gen
double `ff'= 1+2*`theta'*exp(`xb')*`t'
if `touse'
|
|
:
|
207 [+]
|
qui
gen
double `ff0'= 1+2*`theta'*exp(`xb')*`t0' /*
*/
if `t0'>0 & `touse'
|
|
:
|
236 [+]
|
qui
gen
double `ff'= /*
*/ (`d'!=0)+(1/`theta')* /*
*/ (1-sqrt(1+2*`theta'*exp(`xb')*`t'))
if `touse'
|
|
:
|
239 [+]
|
qui
replace
/*
*/ `ff'=`ff'-(1/`theta')* /*
*/ (1-sqrt(1+2*`theta'*exp(`xb')*`t0')) /*
*/
if `t0'>0 & `touse'
|
|
base/e/etpoisson_p.ado:
|
111 [+]
|
gen
`typlist' `varlist' = ///
exp(((`sigma'^2)/2))* ///
(exp(`xb1')-exp(`xb0'))*`onswitch'
|
|
base/f/fpredict.ado:
|
106 [+]
|
quietly
gen
`type' `newvar'=`RSTU'*`RES'/sqrt((1-`HAT')*`SRES'[_N])
|
|
base/f/frac_mun.ado:
|
9 [+]
|
cap
drop
`name'*
All properties
| key |
content |
| command |
drop |
| indent |
2 |
| parameters |
`name'* |
| prefix |
cap |
|
|
base/f/fracpred.ado:
|
173 [+]
|
replace
`v' = `v'+((`j'<`i')+1)*`V'[`i',`j']*`xi'*`xj'
|
|
:
|
184 [+]
|
replace
`v'=`v'+2*`V'[`ncons',`i']*`xi'
|
|
:
|
201 [+]
|
replace
`v'=`v'+`xb'_b[`xi']*`xi'
|
|
base/f/fron_p.ado:
|
163 [+]
|
gen
`vtyp' `varn'=`mu1'+`sigma1'* /*
*/ (normd(-`z')/norm(`z')) /*
*/
if `cond'
|
|
base/f/fron_tn.ado:
|
45 [+]
|
qui
gen
double `w1' = (1-`gamma')*`zd' /*
*/ - $S_COST*`gamma'*(`ytilde'-`xb')
|
|
:
|
70 [+]
|
qui
gen
double `dditdg' = -.5*`zd'*(`gamma'^(-1.5))*`dgt'
|
|
:
|
81 [+]
|
qui
gen
double `gj2' = -(`ytilde'-`xb'+$S_COST*`zd')*$S_COST /*
*/ - `ratio1'/sqrt(`gamma') /*
*/ + `ratio2'*`dditsdzd'
|
|
:
|
90 [+]
|
qui
gen
double `dw1' = (-`zd'-$S_COST*(`ytilde'-`xb'))*`dgt'
|
|
:
|
122 [+]
|
qui
gen
double `d2w2' = `dw2'*(-0.5/`gamma'+0.5/(1-`gamma'))*`dgt' /*
*/ + `w2'*(0.5/(`gamma'^2)+0.5/(1-`gamma')^2)*`dgt'*`dgt' /*
*/ + `w2'*(-0.5/`gamma'+0.5/(1-`gamma'))*`d2gdg2'
|
|
base/g/gamhet_gp.ado:
|
144 [+]
|
gen
`vtyp' `varn'=exp(`sgn'sqrt(`ga')*`sigma'* /*
*/ ln(`cc'/`ga') + `xb')
if `touse'
|
|
:
|
165 [+]
|
gen
`vtyp' `varn'=(`sgn'sqrt(`ga')*`sigma'* /*
*/ ln(`cc'/`ga') + `xb')
if `touse'
|
|
:
|
203 [+]
|
qui
gen
double `ff'= exp(-`uu')*`uu'^(`ga'-1)* /*
*/ exp(-lngamma(`ga'))*`uu'/(sqrt(`ga')*`sigma'*`t') /*
*/
if `touse'
|
|
base/g/gamhet_ip.ado:
|
144 [+]
|
gen
`vtyp' `varn'=exp(`sgn'sqrt(`ga')*`sigma'* /*
*/ ln(`cc'/`ga') + `xb')
if `touse'
|
|
:
|
165 [+]
|
gen
`vtyp' `varn'=(`sgn'sqrt(`ga')*`sigma'* /*
*/ ln(`cc'/`ga') + `xb')
if `touse'
|
|
:
|
203 [+]
|
qui
gen
double `ff'= exp(-`uu')*`uu'^(`ga'-1)* /*
*/ exp(-lngamma(`ga'))*`uu'/(sqrt(`ga')*`sigma'*`t') /*
*/
if `touse'
|
|
base/g/gamma_d2.ado:
|
66 [+]
|
replace
`g1' = `dIdx'*`u'/ /*
*/ (sqrt(`l')*`sig'*`et')
if $ML_samp
|
|
:
|
74 [+]
|
replace
`g1' = `g1' - /*
*/ `dI0dx'*`u0'/ /*
*/ (sqrt(`l')*`sig'*`et0')
if $ML_samp & `t0'>0
|
|
:
|
80 [+]
|
replace
`g2' = `u'*`z'*sign(`k')* /*
*/ `dIdx' / /*
*/ (sqrt(`l')*`et')
if $ML_samp
|
|
:
|
84 [+]
|
replace
`g2' = `g2' - `d'* `g2'
All properties
| key |
content |
| command |
replace |
| indent |
2 |
| parameters |
`g2' = `g2' - `d'* `g2' |
|
|
:
|
86 [+]
|
replace
`g2' = `g2' + `d'*( /*
*/ (`z'* sqrt(`l'))*(`u'/`l' - 1) - 1)
if $ML_samp
|
|
:
|
89 [+]
|
replace
`g2' = `g2' - `u0'*`z0'*sign(`k')* /*
*/ `dI0dx'/ /*
*/ (sqrt(`l')*`et0')
if $ML_samp & `t0' > 0
|
|
:
|
95 [+]
|
replace
`g3' = (2.0*`l'*sqrt(`l')*`detl' - /*
*/ (`z' - 2.0*sqrt(`l'))* /*
*/ `dIdx'*`u')/`et'
if $ML_samp
|
|
:
|
101 [+]
|
replace
`g3' = `g3' + `d'* /*
*/ (-2.0*sign(`k')*`l'*sqrt(`l')* /*
*/ (ln(`l') +(`l' -0.5)/`l' - digamma(`l')) - /*
*/ sign(`k')*`z'*`l' - /*
*/ sign(`k')*`u'*(`z' - 2.0*sqrt(`l')))
if $ML_samp
|
|
:
|
107 [+]
|
replace
`g3' = `g3' - /*
*/ (2.0*`l'*sqrt(`l')*`det0l' - /*
*/ (`z0' - 2.0*sqrt(`l'))* /*
*/ `dI0dx'*`u0')/`et0'/*
*/
if $ML_samp & `t0'> 0
|
|
:
|
127 [+]
|
gen
double `d11' = (-`et'*`u'*sign(`k')*(`d2Idxdx'*`u' + /*
*/ `dIdx') - `u'^2*`dIdx'^2)/((`et'^2)*`l'*`sig'^2)
if $ML_samp
|
|
:
|
137 [+]
|
replace
`d11' = (1 - `d')*`d11'
if $ML_samp
|
|
:
|
141 [+]
|
replace
`d11' = `d11' - (-`et0'*`u0'*sign(`k')*(`d2I0dxdx' /*
*/ *`u0' + `dI0dx') - `u0'^2*`dI0dx'^2)/(`et0'^2*`l'*`sig'^2)/*
*/
if $ML_samp & `t0'>0
|
|
:
|
153 [+]
|
generate
double `d12' = -`u'*`z'*(`dIdx' +`u'*`d2Idxdx')/ /*
*/ (`et'*`l'*`sig') - `u'*`dIdx'*(`et'*sqrt(`l') + /*
*/ sign(`k')*`dIdx'*`u'*`z')/(`et'^2*`l'*`sig')
if $ML_samp
|
|
:
|
164 [+]
|
replace
`d12' = (1 - `d')*`d12'
if $ML_samp
|
|
:
|
169 [+]
|
replace
`d12' = `d12' +`u0'*`z0'*(`dI0dx' +`u0'*`d2I0dxdx')/ /*
*/ (`et0'*`l'*`sig') + `u0'*`dI0dx'*(`et0'*sqrt(`l') + /*
*/ sign(`k')*`dI0dx'*`u0'*`z0')/(`et0'^2*`l'*`sig') /*
*/
if $ML_samp & `t0'> 0
|
|
:
|
182 [+]
|
generate
double `d13' = `u'*sign(`k')* /*
*/ ((`z'-2*sqrt(`l'))*(`dIdx'/*
*/ + `u'*`d2Idxdx') - 2*`l'*sqrt(`l')*`d2Idadx')/ /*
*/ (`et'*sqrt(`l')*`sig') - `u'*`dIdx'*(2*`l'*sqrt(`l')* /*
*/ `detl' - sign(`k')*sqrt(`l')*`et' - /*
*/ `u'*(`z' - 2*sqrt(`l'))*`dIdx')/((`et'^2)*sqrt(`l')*`sig')/*
*/
if $ML_samp
|
|
:
|
209 [+]
|
replace
`d13' = (1 - `d')*`d13'
if $ML_samp
|
|
:
|
214 [+]
|
generate
double `d130' = /*
*/ `u0'*sign(`k')*((`z0'-2*sqrt(`l'))*(`dI0dx'/*
*/ + `u0'*`d2I0dxdx') - 2*`l'*sqrt(`l')*`d2I0dadx')/ /*
*/ (`et0'*sqrt(`l')*`sig') - `u0'*`dI0dx'*(2*`l'*sqrt(`l')* /*
*/ `det0l' - sign(`k')*sqrt(`l')*`et0' - /*
*/ `u0'*(`z0' - 2*sqrt(`l'))*`dI0dx')
|
|
:
|
245 [+]
|
generate
double `d22' = (-`et'*sign(`k')*`u'*`z' /*
*/ *(`d2Idxdx'*`u'*`z' + `z'*`dIdx' + sqrt(`l')*`dIdx') - /*
*/ (`u'*`z')^2*`dIdx'^2)/(`et'^2*`l')
if $ML_samp
|
|
:
|
257 [+]
|
replace
`d22' = (1-`d')*`d22'
if $ML_samp
|
|
:
|
262 [+]
|
replace
`d22' = `d22' - /*
*/ (-`et0'*sign(`k')*`u0'*`z0' /*
*/ *(`d2I0dxdx'*`u0'*`z0' + `z0'*`dI0dx' + /*
*/ sqrt(`l')*`dI0dx') - /*
*/ (`u0'*`z0')^2*`dI0dx'^2)/(`et0'^2*`l') /*
*/
if $ML_samp & `t0' > 0
|
|
:
|
278 [+]
|
generate
double `d23' = `u'*`z'*(`et'*sqrt(`l')*( /*
*/ (`z'-2*sqrt(`l'))*(`u'*`d2Idxdx' + `dIdx') - /*
*/ 2*`d2Idadx'*`l'*sqrt(`l')) - sign(`k')*`dIdx'*( /*
*/ -`dIdx'*sqrt(`l')*`u'*(`z' - 2*sqrt(`l')) + /*
*/ 2*`detl'*`l'^2 - `et'*sign(`k')*`l'))/(`et'^2*`l') /*
*/
if $ML_samp
|
|
:
|
296 [+]
|
replace
`d23' = (1-`d')*`d23'
if $ML_samp
|
|
:
|
298 [+]
|
replace
`d23' = `d23' + `d'* /*
*/ sign(`k')*(`z'*`u'+ `z'*`l' + /*
*/ `z'*`u'*(`z'- 2*sqrt(`l'))/sqrt(`l')) /*
*/
if $ML_samp
|
|
:
|
303 [+]
|
replace
`d23' = `d23' - /*
*/ `u0'*`z0'*(`et0'*sqrt(`l')*( /*
*/ (`z0'-2*sqrt(`l'))*(`u0'*`d2I0dxdx' + `dI0dx') - /*
*/ 2*`d2I0dadx'*`l'*sqrt(`l')) - sign(`k')*`dI0dx'*( /*
*/ -`dI0dx'*sqrt(`l')*`u0'*(`z0' - 2*sqrt(`l')) + /*
*/ 2*`det0l'*`l'^2 - `et0'*sign(`k')*`l'))/(`et0'^2*`l') /*
*/
if $ML_samp & `t0' > 0
|
|
:
|
326 [+]
|
generate
double `d33' = 2*sign(`k')*`l'^2*(-3*`detl' /*
*/ + `u'*(`z'-2*sqrt(`l'))*`d2Idadx'/sqrt(`l') /*
*/ - 2*`l'*`ddetl')/`et'
if $ML_samp
|
|
:
|
330 [+]
|
replace
`d33' = `d33' - 2*`l'*sqrt(`l')*`detl'*( /*
*/ -`u'*(`z' - 2*sqrt(`l'))*`dIdx' /*
*/ + 2*`l'*sqrt(`l')*`detl')/(`et'^2)
if $ML_samp
|
|
:
|
334 [+]
|
replace
`d33' = `d33' - sign(`k')*`u'*( /*
*/ ((`z'-2*sqrt(`l'))^2)*(`dIdx' + `u'*`d2Idxdx') /*
*/ + 2*`l'*`dIdx' /*
*/ - 2*`l'*sqrt(`l')*(`z'-2*sqrt(`l'))*`d2Idadx')/`et' /*
*/
if $ML_samp
|
|
:
|
340 [+]
|
replace
`d33' = `d33' + `u'*(`z'-2*sqrt(`l'))*`dIdx'* /*
*/ (-`u'*(`z'-2*sqrt(`l'))*`dIdx' /*
*/ + 2*`l'*sqrt(`l')*`detl')/(`et'^2)
if $ML_samp
|
|
:
|
345 [+]
|
replace
`d33' = (1-`d')*`d33'
if $ML_samp
|
|
:
|
355 [+]
|
replace
`d33' = `d33' - 2*sign(`k')*(`l'^2)*(-3*`det0l' /*
*/ + `u0'*(`z0'-2*sqrt(`l'))*`d2I0dadx'/sqrt(`l') /*
*/ - 2*`l'*`ddet0l')/`et0'
if $ML_samp & `t0'>0
|
|
:
|
359 [+]
|
replace
`d33' = `d33' + 2*`l'*sqrt(`l')*`det0l'*( /*
*/ -`u0'*(`z0' - 2*sqrt(`l'))*`dI0dx' /*
*/ + 2*`l'*sqrt(`l')*`det0l')/(`et0'^2)
if $ML_samp & `t0'>0
|
|
:
|
363 [+]
|
replace
`d33' = `d33' + sign(`k')*`u0'*( /*
*/ ((`z0'-2*sqrt(`l'))^2)*(`dI0dx' + `u0'*`d2I0dxdx') /*
*/ + 2*`l'*`dI0dx' /*
*/ - 2*`l'*sqrt(`l')*(`z0'-2*sqrt(`l'))*`d2I0dadx')/`et0' /*
*/
if $ML_samp & `t0'>0
|
|
:
|
369 [+]
|
replace
`d33' = `d33' - `u0'*(`z0'-2*sqrt(`l'))*`dI0dx'* /*
*/ (-`u0'*(`z0'-2*sqrt(`l'))*`dI0dx' /*
*/ + 2*`l'*sqrt(`l')*`det0l')/(`et0'^2)
if $ML_samp & `t0'>0
|
|
base/g/gamma_p.ado:
|
148 [+]
|
qui
replace
`varn'= `sgn'*log(`varn')*`sigma' /*
*/ +(abs(`kappa')*`xb')
|
|
:
|
234 [+]
|
qui
gen
double `ff'=((`l'-0.5)*ln(`l')) /*
*/ + (`z'*sqrt(`l'))-`l'*exp(`z'/sqrt(`l')) /*
*/ -lngamma(`l') - ln(`t'* `sigma')
if `touse'
|
|
base/g/glim_l01.ado:
|
19 [+]
|
gen
double `mu' = `eta'*$SGLM_m
|
|
base/g/glim_l04.ado:
|
20 [+]
|
gen
double `return' = `mu'*(1+`mu'*$SGLM_a)
|
|
:
|
24 [+]
|
gen
double `return' = `mu'*(1+`mu'*$SGLM_a)*(1+2*`mu'*$SGLM_a)
|
|
base/g/glim_l09.ado:
|
27 [+]
|
gen
double `return' = 2*`mu'*`mu'*`mu'/($SGLM_m*$SGLM_m)
|
|
base/g/glim_l11.ado:
|
23 [+]
|
gen
double `return' = `mu'^(1-$SGLM_p)*$SGLM_m^$SGLM_p/$SGLM_p
|
|
:
|
27 [+]
|
gen
double `return' = `mu'^(1-2*$SGLM_p)*(1/$SGLM_p)* /*
*/ (1/$SGLM_p-1)*$SGLM_m^$SGLM_p
|
|
base/g/glim_lf.ado:
|
33 [+]
|
qui
replace
`score' = ($ML_y1 - `mu')/(`phi'*`v')*`dmu'
if $ML_samp
|
|
base/g/glim_p.ado:
|
211 [+]
|
qui
gen
double `pt' = _b[`t']*`t'
|
|
base/g/glim_v6.ado:
|
31 [+]
|
gen
double `return' = `mu'+`mu'*`mu'*$SGLM_a
|
|
:
|
43 [+]
|
gen
double `return' = cond(`y'==0, /*
*/ 2*ln(1+`mu'*$SGLM_a)/$SGLM_a, /*
*/ 2*(`y'*ln(`y'/`mu') - /*
*/ (1+`y'*$SGLM_a)/$SGLM_a * /*
*/ ln((1+`y'*$SGLM_a)/(1+`mu'*$SGLM_a))))
|
|
:
|
90 [+]
|
gen
double `return' = (2 - `mu') / sqrt(`mu'+`mu'*`mu'*$SGLM_a)
|
|
base/g/glm.ado:
|
2140 [+]
|
qui
replace
`vt1' = `x'[_n-`j']*`res'*`res'[_n-`j']* /*
*/ `wv'[_n-`j']
if `touse'
|
|
base/g/glm_p.ado:
|
122 [+]
|
gen
double `V' = (`mu'+`e(k)'*`mu'^2)
if `touse'
|
|
base/g/glmpred.ado:
|
118 [+]
|
gen
double `V' = (`mu'+`e(k)'*`mu'^2)
|
|
base/g/gmm.ado:
|
1118 [+]
|
qui
replace
`normwt' = r(N)*`normwt'/r(sum)
|
|
base/g/gomp_lf.ado:
|
29 [+]
|
gen
double `et0' = exp(`g'*$EREGt0)
|
|
:
|
43 [+]
|
replace
`B' = `B' - (`L'/`g')*((`et'*`t')-(`et0'*$EREGt0))
|
|
base/g/gomper_p.ado:
|
128 [+]
|
gen
`vtyp' `varn'=(1/`gamma')* /*
*/ (ln(exp(`xb') + ln(2)*`gamma') - `xb')
if `touse'
|
|
base/g/gompertz.ado:
|
144 [+]
|
gen
double `den' = sum(`wvn'*(`t'-$EREGt0)*`touse')
|
|
base/g/gompertzhet.ado:
|
225 [+]
|
gen
double `den' = sum(`wvn'*(`t'-$EREGt0)*`touse')
|
|
base/g/gomphet_glf.ado:
|
81 [+]
|
replace
`c0' = cond(`t0'>0, /*
*/ (-`f0'+exp(`beta')*`th'*(`t0'*`t0'* /*
*/ exp(`ga'*`t0')- /*
*/ `t0'*exp(`ga'*`t0')/`ga' + (exp(`ga'*`t0')-1)/ /*
*/ (`ga'*`ga')))/`ga',0)
|
|
base/g/gomphet_glf_sh.ado:
|
31 [+]
|
gen
double `logs' = exp(`beta')/`gam'* /*
*/ (`expgt0' - `expgt')
if $ML_samp
|
|
base/g/gomphet_ilf.ado:
|
41 [+]
|
gen
double `f' = (2*`th'*exp(`beta')*`t'* /*
*/ exp(`ga'*`t')-`b')/`ga'
if $ML_samp
|
|
:
|
43 [+]
|
gen
double `f0' = cond(`t0'>0,(2*`th'*exp(`beta')*`t0'* /*
*/ exp(`ga'*`t0')-`b0')/`ga',0)
if $ML_samp
|
|
base/g/gomphet_ilf_sh.ado:
|
32 [+]
|
gen
double `logs' = exp(`beta')/`gam'* /*
*/ (`expgt0' - `expgt')
if $ML_samp
|
|
:
|
128 [+]
|
replace
`dz' = cond(`sumd'<., /*
*/ -(1/`c' - 1)*`ith'^2 + /*
*/ `c'*`sums'*(`a'*`sums' - `ith') , 0) /*
*/
if $ML_samp
|
|
base/g/gomphet_ip.ado:
|
175 [+]
|
qui
gen
double `ff'= `kk'/sqrt(1+2*`theta'/`gamma'* /*
*/ (`kk'-exp(`xb')))
if `touse'
|
|
base/g/gsem.ado:
|
31 [+]
|
capture
drop
`GSEM'*
All properties
| key |
content |
| command |
drop |
| indent |
1 |
| parameters |
`GSEM'* |
| prefix |
capture |
|
|
base/g/gsem_p.ado:
|
8 [+]
|
capture
drop
`tname'*
All properties
| key |
content |
| command |
drop |
| indent |
1 |
| parameters |
`tname'* |
| prefix |
capture |
|
|
base/g/gsem_parse.ado:
|
256 [+]
|
capture
drop
`GSEM'*
All properties
| key |
content |
| command |
drop |
| indent |
1 |
| parameters |
`GSEM'* |
| prefix |
capture |
|
|
base/h/hadimvo.ado:
|
144 [+]
|
replace
`D'=(`r'-1)*`D'/`cf'
All properties
| key |
content |
| command |
replace |
| indent |
2 |
| parameters |
`D'=(`r'-1)*`D'/`cf' |
|
|
:
|
169 [+]
|
replace
`D'=(`r'-1)*`D'/`cf'
All properties
| key |
content |
| command |
replace |
| indent |
3 |
| parameters |
`D'=(`r'-1)*`D'/`cf' |
|
|
base/h/heck_d2.ado:
|
34 [+]
|
qui
gen
double `eta' = (`Is' + /*
*/ ($ML_y1-`Ir')*`rho'/`sig') / sqrt(1-`rho'^2)
|
|
:
|
59 [+]
|
qui
replace
`sc3' = /*
*/ cond(`y2',`M'*(`ym'*`rr'+`eta'*`rho'*`rr'^2)*`dlr',0)
|
|
base/h/heckma_p.ado:
|
209 [+]
|
label
var `varn' "E(`depname'*|Pr(`selname'))"
|
|
base/h/hereg.ado:
|
123 [+]
|
gen
`score' = (`Fakedv'-`predz')*`hess'
|
|
base/i/ipolate.ado:
|
61 [+]
|
by `touse' `by':
replace
`z'=`m'[_N]*`x'+`b'[_N] /*
*/
if `touse' & `ismiss'
|
|
:
|
72 [+]
|
by `touse' `by':
replace
`z'=`M'[_N]*`x'+`B'[_N] /*
*/
if `touse' & `ismiss'
|
|
base/i/ivpoisson.ado:
|
558 [+]
|
qui
replace
`normwt' = r(N)*`normwt'/r(sum)
|
|
base/i/ivregress.ado:
|
255 [+]
|
qui
replace
`normwt' = r(N)*`normwt'/r(sum)
if `touse'
|
|
base/i/ivregress_estat.ado:
|
1281 [+]
|
qui
replace
`normwt' = r(N)*`normwt' / r(sum)
|
|
base/k/kdensity.ado:
|
207 [+]
|
qui
replace
`m' = r(min)-`wwidth'+(_n-1)*`delta'
in 1/`n'
|
|
base/k/kdensity_7.ado:
|
128 [+]
|
qui
replace
`m' = r(min)-`wwidth'+(_n-1)*`delta'
in 1/`n'
|
|
:
|
178 [+]
|
qui
replace
`tden' = `tden'/(`ft'[_N]*`scale')
|
|
base/l/lfit.ado:
|
348 [+]
|
gen
double `qx' = cond(`m'==1, `dw'*`x'[1]/`w'[1],
cond((_n-1)*`dw'>=`w'[`m'-1],
`dw'*(`x'[`m']-`x'[`m'-1])/(`w'[`m']-`w'[`m'-1]),
(_n*`dw'-`w'[`m'-1])
+ `x'[`m'-1] ))
in 1/`group'
-
*(`x'[`m']-`x'[`m'-1])/(`w'[`m']-`w'[`m'-1])
gen double `qx' = cond(`m'==1, `dw'*`x'[1]/`w'[1],
cond((_n-1)*`dw'>=`w'[`m'-1],
`dw'*(`x'[`m']-`x'[`m'-1])/(`w'[`m']-`w'[`m'-1]),
(_n*`dw'-`w'[`m'-1])
+ `x'[`m'-1] ))
in 1/`group'
|
|
:
|
355 [+]
|
replace
`qx' = `qx' - `x'[`m'[_n-1]]
+ cond(`m'[_n-1]==1,
(`w'[1]-(_n-1)*`dw')*`x'[1]/`w'[1],
(`w'[`m'[_n-1]]-(_n-1)*`dw')
/(`w'[`m'[_n-1]]-`w'[`m'[_n-1]-1]) )
in 2/`group'
if `m'>1 & (_n-1)*`dw'<`w'[`m'-1]
-
*(`x'[`m'[_n-1]]-`x'[`m'[_n-1]-1])
replace `qx' = `qx' - `x'[`m'[_n-1]]
+ cond(`m'[_n-1]==1,
(`w'[1]-(_n-1)*`dw')*`x'[1]/`w'[1],
(`w'[`m'[_n-1]]-(_n-1)*`dw')
/(`w'[`m'[_n-1]]-`w'[`m'[_n-1]-1]) )
in 2/`group'
if `m'>1 & (_n-1)*`dw'<`w'[`m'-1]
|
|
base/l/lloghet_glf.ado:
|
42 [+]
|
replace
`g3' = -`a'*`th'*exp(-`c')*`f' + /*
*/ (`c'-`c0')/`th' + exp(-`c0')*`f0'
|
|
:
|
45 [+]
|
replace
`b' = (`b'-1)*`ga'/`b'
All properties
| key |
content |
| command |
replace |
| indent |
2 |
| parameters |
`b' = (`b'-1)*`ga'/`b' |
|
|
:
|
46 [+]
|
replace
`b0' = cond(`t0'>0,(`b0'-1)*`ga'/`b0',0)
|
|
:
|
55 [+]
|
replace
`g2' = -`a'*`th'*exp(-`c')*`b' + exp(-`c0')*`b0' + /*
*/ `d'*(`ga'*(`beta'-ln(`t'))-1-`b')
|
|
:
|
68 [+]
|
gen
double `h' = -`b'*`ga'* /*
*/ (-`b'*(`t'*exp(-`beta'))^(-`ga')+1)
if $ML_samp
|
|
:
|
70 [+]
|
gen
double `h0' = cond(`t0'>0,-`b0'*`ga'* /*
*/ (-`b0'*(`t0'*exp(-`beta'))^(-`ga')+1),0)
if $ML_samp
|
|
base/l/lloghet_glf_sh.ado:
|
64 [+]
|
gen
double `logst' = `iga'*( (1-1/`F')*`lntmu' - /*
*/ (1-1/`F0')*`lntmu0' )
|
|
base/l/lloghet_ilf.ado:
|
54 [+]
|
replace
`g1' = `ga'*(`f'*`c' - `f0'*`c0' + `d'* /*
*/ (`f'*(1+`th'*`c'*`c') - 1))
|
|
:
|
61 [+]
|
replace
`g2' = (`h0'*`c0' - `h'*`c')/`ga' - `d'* /*
*/ (1 + ln(`t')*`ga' - `beta'*`ga' + `h'/`ga'* /*
*/ (`th'*`c'*`c'+1))
|
|
base/l/lloghet_ilf_sh.ado:
|
67 [+]
|
gen
double `logst' = `iga'*((1-1/`F')*`lntmu' - /*
*/ (1-1/`F0')*`lntmu0' )
|
|
:
|
144 [+]
|
replace
`dz' = cond(`sumd'<., /*
*/ -(1/`c' - 1)*`ith'^2 + /*
*/ `c'*`sums'*(`a'*`sums' - `ith') , 0) /*
*/
if $ML_samp
|
|
base/l/lloghet_ip.ado:
|
137 [+]
|
gen
`vtyp' `varn'=exp(`xb')*`cc'
if `touse'
|
|
base/l/lnorm_lf.ado:
|
40 [+]
|
qui
replace
`w1'=`d'*( (1/`es')*`lntxb' - `R'/`es') /*
*/ + `R'/`es' - cond(`t0'>0, `R0'/`es', 0)
|
|
:
|
58 [+]
|
gen
double `f'=`d'*( (-1/`e2s') /*
*/ -(1/`e2s')*((`lntxb')*`net'*`et' /*
*/ -`net'*`net' )/(`et'*`et') ) /*
*/ +(1/`e2s')*((`lntxb')*`net'*`et' /*
*/ -`net'*`net' )/(`et'*`et')
|
|
:
|
70 [+]
|
replace
`f'=`d'*((-2/`es')*`lntxb' /*
*/ -(1/`es')* ( -`R'+ ((`lntxb'^2)*`net'*`et' /*
*/ -`net'*`net'*`lntxb')/(`et'*`et')) ) /*
*/ +(1/`es')* ( -`R'+ ((`lntxb'^2)*`net'*`et' /*
*/ -`net'*`net'*`lntxb')/(`et'*`et'))
|
|
:
|
76 [+]
|
replace
`f'=`f'-(1/`es')* ( -`R0'+ /*
*/ ((`lntxb0'^2)*`net0'*`et0' /*
*/ -`net0'*`net0'*`lntxb0')/(`et0'*`et0')) /*
*/
if `t0'>0
|
|
:
|
84 [+]
|
replace
`f'=`d'*( -2*(`lntxb'^2) /*
*/ -`lntxb'*( ( (`lntxb'^2)*`net'*`et' /*
*/ -`net'*`net'*`lntxb') /(`et'*`et')) /*
*/ +`lntxb'*`R' ) /*
*/ +`lntxb'*(( (`lntxb'^2)*`net'*`et' /*
*/ -`net'*`net'*`lntxb')/(`et'*`et')) /*
*/ -`lntxb'*`R'
|
|
:
|
91 [+]
|
replace
`f'=`f' /*
*/ -`lntxb0'*(((`lntxb0'^2)*`net0'*`et0' /*
*/ -`net0'*`net0'*`lntxb0') /(`et0'*`et0')) /*
*/ +`lntxb0'*`R0'
if `t0'>0
|
|
base/l/lnormhet_ilf.ado:
|
77 [+]
|
replace
`c' = `f'*(`c'-`th'*`h'*`h'*`f'*`f') - /*
*/ `d'*(-1+2*`th'*`th'*`h'*`h'*(`f'^4) + /*
*/ (1-`th'*`f'*`f')*`c')
|
|
base/l/lnormhet_ilf_sh.ado:
|
148 [+]
|
replace
`dz' = cond(`sumd'<., /*
*/ -(1/`c' - 1)*`ith'^2 + /*
*/ `c'*`sums'*(`a'*`sums' - `ith') , 0) /*
*/
if $ML_samp
|
|
base/l/logis_lf.ado:
|
33 [+]
|
qui
replace
`w1'=-(`d'*`g'-(1+`d')*`et'*`g'/(1+`et'))
|
|
:
|
40 [+]
|
qui
replace
`w2'=-(`d'*(`I'*`g' +1+`g'*log(`t')) /*
*/ -(1+`d')*`et'*(`I'+log(`t'))*`g'/(1+`et'))
|
|
:
|
42 [+]
|
qui
replace
`w2' =`w2' - `et0'*(`I'+log(`t0'))*`g'/(1+`et0') /*
*/
if `t0'> 0
|
|
:
|
71 [+]
|
qui
replace
`C'=`d'*`g'*(`xblnt') /*
*/ -(1+`d')*`et'*`g'*`xblnt'* /*
*/ ((`xblnt'*`g')+1+`et')/(1+`et')^2
|
|
base/l/logit_p.ado:
|
231 [+]
|
by `keep' `rhs':
gen
long `y'=cond(_n==_N, /*
*/ sum((`e(depvar)'!=0 & `e(depvar)'<.)*`w'), .)
|
|
:
|
258 [+]
|
replace
`s' = `m'*`p'*(1-`p')*`s'*`s'
if `keep'
|
|
base/l/logrank.ado:
|
258 [+]
|
gen
double `wi' = sum( `ni'*(`n'-`ni')*`cons' )
|
|
base/l/lowess.ado:
|
208 [+]
|
replace
`ys' = `ys'* r(mean)/`mean'
if `touse'
|
|
base/l/lowess_7.ado:
|
147 [+]
|
replace
`ys' = `ys'* r(mean)/`mean'
if `touse'
|
|
base/l/lpoly.ado:
|
284 [+]
|
qui
replace
`xgrid' = r(min) + (_n - 1)*`delta'
in 1/`n'
|
|
base/l/lpredict.ado:
|
89 [+]
|
by `keep' `rhs':
gen
long `y'=cond(_n==_N, /*
*/ sum((`l'!=0 & `l'!=.)*`w') ,.)
|
|
:
|
111 [+]
|
replace
`new'=`m'*`p'*(1-`p')*`rthat'*`rthat'
|
|
base/l/lsens_x.ado:
|
23 [+]
|
gen
double `sumy' = sum((`y'==0)*`w')
if `touse'
|
|
:
|
29 [+]
|
replace
`sumy' = sum((`y'!=0)*`w')
if `touse'
|
|
base/l/ltable.ado:
|
207 [+]
|
gen
`H' = 2*`fail'/((2-`fail')*`dI')
|
|
base/l/ltable_7.ado:
|
131 [+]
|
gen
`H' = 2*`fail'/((2-`fail')*`dI')
|
|
base/l/ltable_9.ado:
|
183 [+]
|
gen
`H' = 2*`fail'/((2-`fail')*`dI')
|
|
base/m/mdslong.ado:
|
363 [+]
|
gen
`j12' = cond(`j1'<`j2', (`j1'-1)*`n'+`j2', (`j2'-1)*`n'+`j1')
|
|
base/m/merge_10.ado:
|
198 [+]
|
qui
recode
`_merge'?* (1 .=0) (2/5=1)
All properties
| key |
content |
| command |
recode |
| indent |
3 |
| parameters |
`_merge'?* (1 .=0) (2/5=1) |
| prefix |
qui |
|
|
base/m/mfp_10.ado:
|
445 [+]
|
cap
drop
`stub`i''*
All properties
| key |
content |
| command |
drop |
| indent |
2 |
| parameters |
`stub`i''* |
| prefix |
cap |
|
|
base/m/mgarch_dvech_p.ado:
|
719 [+]
|
qui
predict
double `res'*
if `touse'
, residuals
|
|
base/m/mhodds.ado:
|
239 [+]
|
qui by `touse' `strata' `by':
gen
double `pt'= /*
*/ sum((`d'+`h')*`wt')
if `touse'
|
|
:
|
244 [+]
|
qui by `touse' `strata' `by':
gen
double `p1'= /*
*/ sum((`d'+`h')*`e'*`wt')
if `touse'
|
|
:
|
246 [+]
|
qui by `touse' `strata' `by':
gen
double `p2' = /*
*/ sum((`d'+`h')*`e'*`e'*`wt')
if `touse'
|
|
base/m/ml_5.ado:
|
401 [+]
|
gen
double `sumff' = sum(`ff'*$S_mlwgt)
|
|
:
|
623 [+]
|
qui
gen
double `fatS' = sum(`fmhi'*$S_mlwgt)
|
|
:
|
672 [+]
|
qui
replace
`fatS' = sum(`fmhi'*$S_mlwgt)
|
|
base/n/nbreg.ado:
|
543 [+]
|
qui
replace
`z' = lngamma(`y'+exp(`z')) - lngamma(`y'+1) /*
*/ - lngamma(exp(`z')) + `lndelta'*`y' - (`y'+exp(`z'))*`lnoned' `if'
|
|
base/n/nbreg_al.ado:
|
45 [+]
|
qui
replace
`g2' = `y' - (`y'+`m')*`delta'/(1+`delta') - `g1' /*
*/
if $ML_samp
|
|
base/n/newey.ado:
|
165 [+]
|
replace
`vt1' = `x'*`e'* /*
*/ l`j'.`e'*l`j'.`wvar'* /*
*/ `ow'
if `touse'
|
|
base/n/newey_7.ado:
|
116 [+]
|
replace
`vt1' = `x'[_n-`j']*`e'* /*
*/ `e'[_n-`j']*`wvar'[_n-`j']* /*
*/ `ow'
if `touse'
|
|
base/n/nl_p.ado:
|
211 [+]
|
qui
replace
`varlist' = `plow'*`lb' + /*
*/ (1-`plow')*`e' /*
*/ if !mi(`lb') & mi(`ub') & `touse'
|
|
:
|
214 [+]
|
qui
replace
`varlist' = `pmid'*`e' + /*
*/ (1-`pmid')*`ub' /*
*/ if mi(`lb') & !mi(`ub') & `touse'
|
|
:
|
217 [+]
|
qui
replace
`varlist' = `plow' * `lb' + /*
*/ `pmid'*`e' + (1-`plow'-`pmid')*`ub' /*
*/ if !mi(`lb') & !mi(`ub') & `touse'
|
|
base/n/nlog_rd.ado:
|
110 [+]
|
qui
replace
`di' = /*
*/ (${ML_y`m'} - `p`j''*${ML_y`k'})
if `touse'
|
|
:
|
223 [+]
|
qui
replace
`ck' = cond($ML_y1,`Ij'* ///
(cond(${ML_y`l2'}==`jlev',1,0)+`dldtj'),0)
-
qui replace `ck' = cond($ML_y1,`Ij'* ///
(cond(${ML_y`l2'}==`jlev',1,0)+`dldtj'),0)
|
|
base/n/nlsur.ado:
|
493 [+]
|
qui
replace
`normwt' = r(N)*`normwt'/r(sum)
|
|
base/o/op_inv.ado:
|
52 [+]
|
replace
`R' = cond(l`snum'.`_dta[_TStvar]'>=`dyn', /*
*/ l`snum'.`R', l`snum'.`Y0') + `X'
if `touse'
|
|
base/o/orthog.ado:
|
72 [+]
|
replace
`x`j'' = `x`j'' - r(mean)*`x`i''
|
|
:
|
100 [+]
|
replace
`x`j'' = `x`j'' - r(mean)*`x`i''
|
|
base/o/orthpoly.ado:
|
66 [+]
|
gen
double `q`i'' = (`a'*`x' + `b')*`q`j'' /*
*/ - `c'*`q`k''
if `doit'
|
|
base/p/probit_p.ado:
|
180 [+]
|
by `keep' `uorhs':
gen
long `y'=cond(_n==_N, /*
*/ sum((`e(depvar)'!=0 & `e(depvar)'<.)*`w'), .)
|
|
base/q/qreg_c.ado:
|
32 [+]
|
qui
replace
`r'=cond(`r'>=0,`quant',`quant'-1)*`r'
|
|
base/q/quantile.ado:
|
25 [+]
|
gen
`LINE'=`QUANT'[1] + `CNT'* /*
*/ ((`QUANT'[`CNT'[_N]]-`QUANT'[1])/`CNT'[_N])
|
|
base/q/quantile_7.ado:
|
11 [+]
|
gen
`LINE'=`QUANT'[1] + `CNT'* /*
*/ ((`QUANT'[`CNT'[_N]]-`QUANT'[1])/`CNT'[_N])
|
|
base/r/regre_p2.ado:
|
126 [+]
|
replace
`Y' = `p'*`E' + (1-`p')*`lb' /*
*/
if `touse' & `lb'!=. & `ub'==.
|
|
:
|
128 [+]
|
replace
`Y' = `p'*`E' + (1-`p')*`ub' /*
*/
if `touse' & `lb'==. & `ub'!=.
|
|
:
|
130 [+]
|
replace
`Y' = `p'*`E' + `p2'*`lb' + (1-`p'-`p2')*`ub' /*
*/
if `touse' & `lb'!=. & `ub'!=.
|
|
base/r/regres_p.ado:
|
250 [+]
|
gen
`type' `newvar'=`RSTU'*`RES'/sqrt((1-`HAT')*`SRES'[_N])
|
|
base/r/rocreg_p.ado:
|
407 [+]
|
qui
replace
`intercept_`varit'' = ///
`bmat'[1,`icr']*`ivar'+
|
|
base/r/rocregstat.ado:
|
342 [+]
|
qui
gen
double `roc_`vvit''= ///
`eb'[1,`ic'] + ///
`eb'[1,`sc']*`lirc'
|
|
base/r/roctab.ado:
|
615 [+]
|
by `touse' `C':
gen
`row1' = sum(`touse'*(1-`D')*`wv')
|
|
:
|
628 [+]
|
gen
`row6' = `row3'*(`row4'*(`row4'+`row1')+(1/3)*`row1'^2)
if `touse'
|
|
:
|
631 [+]
|
gen
`row7' = `row1'*(`row2'*(`row2'+`row3')+(1/3)*`row3'^2)
if `touse'
|
|
base/r/roctab_7.ado:
|
499 [+]
|
by `touse' `C':
gen
`row1' = sum(`touse'*(1-`D')*`wv')
|
|
:
|
512 [+]
|
gen
`row6' = `row3'*(`row4'*(`row4'+`row1')+(1/3)*`row1'^2)
if `touse'
|
|
:
|
515 [+]
|
gen
`row7' = `row1'*(`row2'*(`row2'+`row3')+(1/3)*`row3'^2)
if `touse'
|
|
base/r/rologit_p.ado:
|
94 [+]
|
gen
`vtyp' `varn' = `p'*(1-`p')*`b'
if `touse'
|
|
base/r/rreg.ado:
|
182 [+]
|
replace
`y'= `y' + /*
*/ (`lambda'*`scale'/`aa')*(`res'/`scale')*`weight' /*
*/
if `touse'
|
|
base/s/sample.ado:
|
89 [+]
|
by `by':
replace
`N'=int(`N'[_N]*`exp'/100+.5)
|
|
base/s/sem.ado:
|
81 [+]
|
capture
drop
`SEM'*
All properties
| key |
content |
| command |
drop |
| indent |
2 |
| parameters |
`SEM'* |
| prefix |
capture |
|
|
base/s/slogit_d2.ado:
|
31 [+]
|
replace
`p`i'' = `p`i'' - el(`phi`dm'',1,`i')*`xb`dm''
|
|
base/s/stmh.ado:
|
193 [+]
|
by `str' `by':
gen
double `d1' = /*
*/ sum(`wt'*_d *`e')
|
|
:
|
204 [+]
|
gen
double `d1' = sum(`wt'*_d *`e')
|
|
base/s/stphtest.ado:
|
229 [+]
|
gen
double `wrk' = sum(cond(e(sample), /*
*/ (`rnk'-`rvar')*``i'', 0))
|
|
:
|
265 [+]
|
gen
double `gnum' = sum(cond(e(sample), /*
*/ (`rnk'-`rvar')*``i'',0))
|
|
base/s/stphtest_7.ado:
|
205 [+]
|
gen
double `wrk' = sum(cond(e(sample), /*
*/ (`rnk'-`rvar')*``i'', 0))
|
|
:
|
241 [+]
|
gen
double `gnum' = sum(cond(e(sample), /*
*/ (`rnk'-`rvar')*``i'',0))
|
|
base/s/suest.ado:
|
184 [+]
|
capture
predict
double `sci'*
if `esamp'
, score
|
|
base/s/svygen.ado:
|
78 [+]
|
quietly by `by' :
replace
`wgt' = (_n==1)*`postwt'
|
|
base/s/svytab.ado:
|
771 [+]
|
gen
double `x' = ($S_VYexp)*`y'
|
|
:
|
1438 [+]
|
gen
double `xc' = e(total)*`bij'
in 1/`ncat'
|
|
:
|
1441 [+]
|
replace
`xc' = e(total)*`matr'[1,_n-`Nr1'+1] /*
*/
in `Nr1'/`Nr2'
|
|
:
|
1443 [+]
|
replace
`xc' = e(total)*`matc'[1,_n-`Nc1'+1] /*
*/
in `Nc1'/`Nc2'
|
|
:
|
1527 [+]
|
replace
`xse' = `porp'* /*
*/ sqrt(`V'[_n-`Nr1'+1, /*
*/ _n-`Nr1'+1])
in `Nr1'/`Nr2'
|
|
:
|
1533 [+]
|
replace
`xse' = `porp'* /*
*/ sqrt(`V'[_n-`Nc1'+1, /*
*/ _n-`Nc1'+1])
in `Nc1'/`Nc2'
|
|
base/s/svytab_7.ado:
|
759 [+]
|
gen
double `x' = ($S_VYexp)*`y'
|
|
:
|
1349 [+]
|
gen
double `xc' = e(total)*`bij'
in 1/`ncat'
|
|
:
|
1352 [+]
|
replace
`xc' = e(total)*`matr'[1,_n-`Nr1'+1] /*
*/
in `Nr1'/`Nr2'
|
|
:
|
1354 [+]
|
replace
`xc' = e(total)*`matc'[1,_n-`Nc1'+1] /*
*/
in `Nc1'/`Nc2'
|
|
:
|
1436 [+]
|
replace
`xse' = `porp'* /*
*/ sqrt(`V'[_n-`Nr1'+1, /*
*/ _n-`Nr1'+1])
in `Nr1'/`Nr2'
|
|
:
|
1442 [+]
|
replace
`xse' = `porp'* /*
*/ sqrt(`V'[_n-`Nc1'+1, /*
*/ _n-`Nc1'+1])
in `Nc1'/`Nc2'
|
|
base/t/tnbreg.ado:
|
650 [+]
|
qui
replace
`z' = lngamma(`y'+exp(`z')) - lngamma(`y'+1) /*
*/ - lngamma(exp(`z')) + `lndelta'*`y' - (`y'+exp(`z'))*`lnoned' /*
*/ - ln(nbinomialtail(exp(`z'),$ztnb_tp+1,(1+exp(`mudelta')) )) `if'
|
|
base/t/tnbreg_cons.ado:
|
114 [+]
|
qui
gen
double `f2' = `y' -(`y'+`m')*`delta'/
All properties
| key |
content |
| command |
gen |
| comment |
///
(1+`delta') - `z2' if $ML_samp |
| indent |
2 |
| parameters |
double `f2' = `y' -(`y'+`m')*`delta'/ |
| prefix |
qui |
|
|
base/t/tnbreg_mean.ado:
|
160 [+]
|
qui
gen
double `z3' = cond($ML_samp & `tp'==0, ///
-`p'^(`m'+1)*`mu'/ `z2', ///
cond($ML_samp & `tp'>0, ///
-(`x3'-`x2')/(2*`h2'), .))
-
qui gen double `z3' = cond($ML_samp & `tp'==0, ///
-`p'^(`m'+1)*`mu'/ `z2', ///
cond($ML_samp & `tp'>0, ///
-(`x3'-`x2')/(2*`h2'), .))
|
|
base/t/treatr_p.ado:
|
157 [+]
|
gen
`vtyp' `varn' = `Xb'- `trtname'*[`depname']_b[`trtname'] /*
*/ + [`depname']_b[`trtname'] + (normd(`Xbprb') / /*
*/ normprob(`Xbprb')) * `sigma' * `rho'
|
|
:
|
166 [+]
|
gen
`vtyp' `varn' = `Xb'- `trtname'*[`depname']_b[`trtname'] /*
*/ - (normd(`Xbprb')/normprob(-`Xbprb')) /*
*/ * `sigma' * `rho'
|
|
base/t/trnb_cons.ado:
|
48 [+]
|
qui
replace
`g1' = `z2'-(1+`delta')^(-`m')*`lnoned'*`m' /*
*/ / `z3'
if $ML_samp
|
|
:
|
51 [+]
|
qui
replace
`g2' = `y' -(`y'+`m')*`delta'/(1+`delta') - `z2' /*
*/ + (1+ `delta')^(-`m')*(`m'*ln(1+`delta') /*
*/ -`mu'/(1+`delta') )/ `z3'
if $ML_samp
|
|
base/t/trnb_mean.ado:
|
45 [+]
|
replace
`sc1' = `p'*(`y'-`mu') - /*
*/ `p'^(`m'+1)*`mu'/ `z2'
if $ML_samp
|
|
base/u/u_mi_impute_fv2var.ado:
|
11 [+]
|
cap
drop
`fvstub'*
All properties
| key |
content |
| command |
drop |
| indent |
2 |
| parameters |
`fvstub'* |
| prefix |
cap |
|
|
base/v/varlmar.ado:
|
113 [+]
|
qui
gen
double `e`i'_`j''=l`j'.`tvar1'
|
|
base/w/weib1_lf.ado:
|
38 [+]
|
replace
`g2' = /*
*/ `p'*(((`xb'-`lnt')*`eplnt' - (`xb'-`lnt0')*`eplnt0') /*
*/ + `d'*((`lnt'-`xb' + 1/`p')))
|
|
base/w/weibhet_glfa.ado:
|
25 [+]
|
gen
double `b' = exp(-`beta'*`p')*`t'^`p'
if $ML_samp
|
|
:
|
26 [+]
|
gen
double `b0' = cond(`t0'>0, exp(-`beta'*`p')*`t0'^`p',0) /*
*/
if $ML_samp
|
|
base/w/weibhet_gp.ado:
|
180 [+]
|
qui
gen
double `kk' = exp(`xb')*`t'^(`auxp'-1) /*
*/
if `touse'
|
|
:
|
195 [+]
|
qui
gen
double `ff'= 1+`theta'*exp(`xb')*`t'^`auxp' /*
*/
if `touse'
|
|
:
|
197 [+]
|
qui
gen
double `ff0'= 1+`theta'*exp(`xb')*`t0'^`auxp' /*
*/
if `t0'>0 & `touse'
|
|
:
|
226 [+]
|
qui
gen
double `ff'= /*
*/ (`d'!=0)-(1/`theta')* /*
*/ ln(1+`theta'*exp(`xb')*`t'^`auxp')
if `touse'
|
|
:
|
229 [+]
|
qui
replace
/*
*/ `ff'=`ff'+(1/`theta')* /*
*/ ln(1+`theta'*exp(`xb')*`t0'^`auxp') /*
*/
if `t0'>0 & `touse'
|
|
base/w/weibhet_ilf.ado:
|
26 [+]
|
gen
double `b' = exp(`beta')*`t'^`p'
if $ML_samp
|
|
:
|
27 [+]
|
gen
double `b0' = cond(`t0'>0, exp(`beta')*`t0'^`p',0) /*
*/
if $ML_samp
|
|
:
|
41 [+]
|
replace
`g1' = -`f' + `f0' + `d'* /*
*/ (1 - `th'*`f'/`c')
All properties
| key |
content |
| command |
replace |
| indent |
2 |
| parameters |
`g1' = -`f' + `f0' + `d'* /*
*/ (1 - `th'*`f'/`c') |
|
|
:
|
43 [+]
|
replace
`g2' = (-`f'*`lnt' + `f0'*`lnt0' + `d'*`lnt'* /*
*/ (1-`th'*`f'/`c'))*`p' + `d'
|
|
base/w/weibhet_ilf_sh.ado:
|
128 [+]
|
replace
`dz' = cond(`sumd'!=., /*
*/ -(1/`c' - 1)*`ith'^2 + /*
*/ `c'*`sums'*(`a'*`sums' - `ith') , 0) /*
*/
if $ML_samp
|
|
base/w/weibhet_ilfa_sh.ado:
|
136 [+]
|
replace
`dz' = cond(`sumd'!=., /*
*/ -(1/`c' - 1)*`ith'^2 + /*
*/ `c'*`sums'*(`a'*`sums' - `ith') , 0) /*
*/
if $ML_samp
|
|
base/w/weibhet_ip.ado:
|
183 [+]
|
qui
gen
double `kk' = exp(`xb')*`t'^(`auxp'-1)
if `touse'
|
|
:
|
197 [+]
|
qui
gen
double `ff'= 1+2*`theta'*exp(`xb')*`t'^`auxp' /*
*/
if `touse'
|
|
:
|
199 [+]
|
qui
gen
double `ff0'= 1+2*`theta'*exp(`xb')*`t0'^`auxp' /*
*/
if `t0'>0 & `touse'
|
|
:
|
228 [+]
|
qui
gen
double `ff'= /*
*/ (`d'!=0)+(1/`theta')* /*
*/ (1-sqrt(1+2*`theta'*exp(`xb')*`t'^`auxp'))
if `touse'
|
|
:
|
231 [+]
|
qui
replace
/*
*/ `ff'=`ff'-(1/`theta')* /*
*/ (1-sqrt(1+2*`theta'*exp(`xb')*`t0'^`auxp')) /*
*/
if `t0'>0 & `touse'
|
|
base/w/weibul_p.ado:
|
237 [+]
|
gen
`vtyp' `varn' = /*
*/ exp( -exp(`rgn'*`xb')* `t'^`aux_p' ) / /*
*/ exp( -exp(`rgn'*`xb')*`t0'^`aux_p' )
if `touse'
|
|
base/w/wntestb_7.ado:
|
297 [+]
|
gen
int `mapy' = ($S_GPH_ay)*`y' + ($S_GPH_by)
|
|
:
|
298 [+]
|
gen
int `mapx' = ($S_GPH_ax)*`x' + ($S_GPH_bx)
|
|
:
|
315 [+]
|
gen
int `mapy1'=($S_GPH_ay)*`inarg' + ($S_GPH_by)
|
|
:
|
317 [+]
|
gen
int `mapx1'=($S_GPH_ax)*`inarg' + ($S_GPH_bx)
|
|
:
|
333 [+]
|
replace
`mapy2'=($S_GPH_ay)*`inarg' + ($S_GPH_by)
|
|
:
|
336 [+]
|
replace
`mapx2'=($S_GPH_ax)*`inarg' + ($S_GPH_bx)
|
|
:
|
396 [+]
|
gen
int `mapy' = ($S_GPH_ay)*`y' + ($S_GPH_by)
|
|
:
|
397 [+]
|
gen
int `mapx' = ($S_GPH_ax)*`x' + ($S_GPH_bx)
|
|
:
|
489 [+]
|
gen
int `mapy' = ($S_GPH_ay)*`y' + ($S_GPH_by)
|
|
:
|
490 [+]
|
gen
int `mapx' = ($S_GPH_ax)*`x' + ($S_GPH_bx)
|
|
base/x/xi.ado:
|
423 [+]
|
label
var `stub'`num1' "(`lbl1')*`part2'"
|
|
base/x/xi_6.ado:
|
215 [+]
|
label
var `stub'`num1' "(`lbl1')*`part2'"
|
|
base/x/xtcloglog.ado:
|
420 [+]
|
gen
double `logFc' = log((`sn'==1) -`sn'* exp(-exp(`xb')))
if `touse'
|
|
base/x/xtgee.ado:
|
1564 [+]
|
replace
`dj' = 2*(`y'*ln(`y'/`mu')-(1+`k'*`y')/`k'* /*
*/ ln((1+`k'*`y')/(1+`k'*`mu')))
if `y'
|
|
:
|
1666 [+]
|
replace
`dj' = 2*(`y'*ln(`y'/`mu')-(1+`k'*`y')/`k'* /*
*/ ln((1+`k'*`y')/(1+`k'*`mu')))
if `y'
|
|
base/x/xtgee_p.ado:
|
229 [+]
|
qui
replace
`xb' = (`e(power)'*`xb'+1)^(1/`e(power)') /*
*/
if `touse'
|
|
base/x/xtgee_plink.ado:
|
42 [+]
|
replace
`m' = (`m'/`N'*.9999)*`N'
All properties
| key |
content |
| command |
replace |
| indent |
3 |
| parameters |
`m' = (`m'/`N'*.9999)*`N' |
|
|
base/x/xtgls.ado:
|
681 [+]
|
gen
double ${X_ee}`i' = $X_ee[`b0'+_n]
in 1/$X_nt
|
|
base/x/xtregar.ado:
|
308 [+]
|
qui by `id':
gen
`tvar'=(sqrt(1-`rho'^2))*`x'
if _n==1
|
|
:
|
554 [+]
|
replace
`g_i'=sqrt(1-`rho'^2)*`g_i'
|
|
:
|
1143 [+]
|
by `id':
gen
double `zresLD'=(`zres'-`zres'[_n-1]*`Itj')^2
|
|
base/x/xtsf_ll.ado:
|
76 [+]
|
gen
double `denom' = sqrt(`gamma'*(1-`gamma')*`sigmaS2' /*
*/ *(1+(`eta2'-1)*`gamma'))
if $ML_samp
|
|
:
|
83 [+]
|
gen
double `f' = -1/2*`T'*(ln(2*_pi)+ln(`sigmaS2')) /*
*/ - 1/2*(`T'-1)*ln(1-`gamma') /*
*/ - 1/2*ln(1+(`eta2'-1)*`gamma') /*
*/ - ln(normprob(`z')) - 1/2*`z'^2 /*
*/ + ln(normprob(`zi')) /*
*/ + 1/2*`zi'^2 /*
*/ - 1/2*(`e2'/((1-`gamma')*`sigmaS2'))
|
|
:
|
143 [+]
|
gen
double `dne' = /*
*/ `sigmaS2'*(`gamma'-`gamma'^2)*`gamma'*`deta2'
|
|
:
|
151 [+]
|
gen
double `dzgamma' = -(`mu'+$S_COST*`eta_e')/`denom' /*
*/ - 0.5*(`mu'*(1-`gamma')-$S_COST*`gamma'*`eta_e') /*
*/ *`dng'/(`denom'^3)
|
|
:
|
157 [+]
|
gen
double `dzeta' = -$S_COST*`gamma'*`deta_e'/`denom' /*
*/ - (`mu'*(1-`gamma')-$S_COST*`gamma'*`eta_e')*0.5 /*
*/ *`dne'/`denom'^3
|
|
base/x/xtsf_llti.ado:
|
71 [+]
|
gen
double `denom' = sqrt(`gamma'*(1-`gamma')*`sigmaS2' /*
*/ *(1+(`eta2'-1)*`gamma'))
if $ML_samp
|
|
:
|
78 [+]
|
gen
double `f' = -1/2*`T'*(ln(2*_pi)+ln(`sigmaS2')) /*
*/ - 1/2*(`T'-1)*ln(1-`gamma') /*
*/ - 1/2*ln(1+(`eta2'-1)*`gamma') /*
*/ - ln(normprob(`z')) - 1/2*`z'^2 /*
*/ + ln(normprob(`zi')) /*
*/ + 1/2*`zi'^2 /*
*/ - 1/2*(`e2'/((1-`gamma')*`sigmaS2'))
if $ML_samp
|
|
:
|
131 [+]
|
gen
double `dzgamma' = -(`mu'+$S_COST*`eta_e')/`denom' /*
*/ - 0.5*(`mu'*(1-`gamma')-$S_COST*`gamma'*`eta_e') /*
*/ *`dng'/(`denom'^3)
|
|
base/z/zinb_llf.ado:
|
39 [+]
|
qui
gen
double `fz' = exp(`zg')*`f1'*`f1'
if $ML_samp
|
|
:
|
71 [+]
|
qui
replace
`ttt' = cond(`y' == 0,
(-`f1'*`mu'*`p'^(`m'+1)*
(`alpha'*`mu'*(`m'+1)*`p'-1))/`f2' +
`sc1'*`sc1',
`alpha'*`mu'*`p'^2*(`y'-`mu')+`mu'*`p' )
if $ML_samp
|
|
:
|
84 [+]
|
qui
replace
`ttt' = cond(`y' == 0,
(-`f1'*`mu'*`p'^(`m'+1)*((`m'+1)*`mu'*`p'+
`m'*`m'*ln(`p')))/`f2' +
`f1'*`f1'*`mu'*`p'^(2*`m'+1)*(`m'*`mu'*`p'+
`m'*`m'*ln(`p'))/(`f2'*`f2'),
`mu'*`p'^2*(`y'-`mu') )
if $ML_samp
-
qui replace `ttt' = cond(`y' == 0,
(-`f1'*`mu'*`p'^(`m'+1)*((`m'+1)*`mu'*`p'+
`m'*`m'*ln(`p')))/`f2' +
`f1'*`f1'*`mu'*`p'^(2*`m'+1)*(`m'*`mu'*`p'+
`m'*`m'*ln(`p'))/(`f2'*`f2'),
`mu'*`p'^2*(`y'-`mu') ) if $ML_samp
|
|
:
|
93 [+]
|
qui
replace
`ttt' = cond(`y' == 0 ,
-(1-exp(`zg'))*`f1'*`fz'*(1-`p'^`m') / `f2' +
(`fz'*(1-`p'^`m') / `f2')^2 ,
(1-exp(`zg'))*`f1'*`fz'/`f1' + (`fz'/`f1')^2)
if $ML_samp
|
|
:
|
99 [+]
|
qui
replace
`ttt' = cond(`y' == 0,
-`fz'/`f2'*(1+(1-`p'^`m')*`f1'/`f2')*
`p'^`m'*(`m'*`m'*ln(`p')+`m'*`mu'*`p'),
0 )
if $ML_samp
|
|
base/z/zinb_plf.ado:
|
70 [+]
|
qui
replace
`ttt' = cond(`y' == 0,
(-`f1'*`mu'*`p'^(`m'+1)*
(`alpha'*`mu'*(`m'+1)*`p'-1))/`f2' +
`sc1'*`sc1',
`alpha'*`mu'*`p'^2*(`y'-`mu')+`mu'*`p' )
if $ML_samp
|
|
:
|
77 [+]
|
qui
replace
`ttt' = cond(`y' == 0,
-normd(`zg')*`mu'*`p'^(`m'+1) / `f2' -
`f1'*`mu'*`p'^(`m'+1)*normd(`zg')*(1-`p'^`m') / (`f2'*`f2') ,
0 )
if $ML_samp
|
|
:
|
83 [+]
|
qui
replace
`ttt' = cond(`y' == 0,
(-`f1'*`mu'*`p'^(`m'+1)*((`m'+1)*`mu'*`p'+
`m'*`m'*ln(`p')))/`f2' +
`f1'*`f1'*`mu'*`p'^(2*`m'+1)*(`m'*`mu'*`p'+
`m'*`m'*ln(`p'))/(`f2'*`f2'),
`mu'*`p'^2*(`y'-`mu') )
if $ML_samp
-
qui replace `ttt' = cond(`y' == 0,
(-`f1'*`mu'*`p'^(`m'+1)*((`m'+1)*`mu'*`p'+
`m'*`m'*ln(`p')))/`f2' +
`f1'*`f1'*`mu'*`p'^(2*`m'+1)*(`m'*`mu'*`p'+
`m'*`m'*ln(`p'))/(`f2'*`f2'),
`mu'*`p'^2*(`y'-`mu') ) if $ML_samp
|
|
:
|
98 [+]
|
qui
replace
`ttt' = cond(`y' == 0,
-normd(`zg')/`f2'*(1+(1-`p'^`m')*`f1'/`f2')*
`p'^`m'*(`m'*`m'*ln(`p')+`m'*`mu'*`p'),
0 )
if $ML_samp
|
|
base/z/zip.ado:
|
375 [+]
|
replace
`prhat'=(1-`psihat')*(exp(-1*`muhat') /*
*/ *`muhat'^`dep')/exp(lnfact(`dep')) /*
*/
if `dep'>0 & `dep'<. & `touse'
|
|
base/z/zip_llf.ado:
|
27 [+]
|
qui
gen
double `fz' = exp(`zg')*`f1'*`f1'
if $ML_samp
|
|
:
|
58 [+]
|
qui
replace
`ttt' = cond($ML_y1 == 0,
-`fz'*`lambda'*exp(-`lambda') / `f2' -
`fz'*(1-exp(-`lambda'))*`f1'*
`lambda'*exp(-`lambda') / `f2'^2,
0)
if $ML_samp
|
|
:
|
66 [+]
|
qui
replace
`ttt' = cond($ML_y1 == 0 ,
-(1-exp(`zg'))*`f1'*`fz'*(1-exp(-`lambda')) / `f2' +
(`fz'*(1-exp(-`lambda')) / `f2')^2 ,
(1-exp(`zg'))*`f1'*`fz'/`f1' + (`fz'/`f1')^2)
if $ML_samp
|
|
base/z/zip_plf.ado:
|
58 [+]
|
qui
replace
`ttt' = cond($ML_y1 == 0,
-normd(`zg')*`lambda'*exp(-`lambda') / `f2' -
normd(`zg')*(1-exp(-`lambda'))*`f1'*
`lambda'*exp(-`lambda') / `f2'^2,
0)
if $ML_samp
|
|
base/z/ztnb.ado:
|
501 [+]
|
qui
replace
`z' = lngamma(`y'+exp(`z')) - lngamma(`y'+1) /*
*/ - lngamma(exp(`z')) + `lndelta'*`y' - (`y'+exp(`z'))*`lnoned' /*
*/ - ln(1-(1+exp(-`lndelta'*`mudelta'))) `if'
|
-
-
Script Output
low: Low price Number of Observations
--------------- ------------------------------
Total Integers Nonintegers
| # Negative - - -
| # # Zero - - -
| # # Positive 248 2 246
| # # ----- ----- -----
| # # # # Total 248 2 246
| . # # # # Missing -
+---------------------- -----
944.75 1364.66 248
(More than 99 unique values)
Variable | Obs Mean Std. Dev. Min Max
-------------+--------------------------------------------------------
low | 248 1183.334 87.47576 944.75 1364.66
@mean 1183.334
@sd 87.476
@min 944.750
@max 1364.660
@example0 1276.05
@histh .00028808, .00057616, .00043212, .00129636, .00259272, .0014404, .00518544, .00475332, .00302484, .00446524, .00388908, .00259272, .00158444, .00187252, .00172848
@histw 958.74701, 986.74103, 1014.735, 1042.729, 1070.723, 1098.717, 1126.7111, 1154.7051, 1182.699, 1210.693, 1238.687, 1266.681, 1294.675, 1322.6691, 1350.6631
@type float
@label Low price
@class other
@N_unique .
@N 248
|
[+]
open
@sp500.dta |
|
other
(float)
|
248
(.)
|
(x̄=1194.884, 87.128) [965.800,1373.730] |
Opening price
|
All properties
| key |
content |
| N |
248 |
| N_unique |
. |
| class |
other |
| example0 |
1320.28 |
| histh |
.00029654, .00074135, .00059308, .0014827, .00222405, .00237232, .005486, .0040033, .00341022, .0040033, .00415157, .00266886, .00177924, .00163097, .00192751 |
| histw |
979.39764, 1006.593, 1033.7883, 1060.9836, 1088.179, 1115.3743, 1142.5697, 1169.765, 1196.9603, 1224.1556, 1251.351, 1278.5463, 1305.7417, 1332.937, 1360.1323 |
| label |
Opening price |
| max |
1373.730 |
| mean |
1194.884 |
| min |
965.800 |
| sd |
87.128 |
| type |
float |
Data Manipulations with open
| file |
# |
command |
|
base/a/arch.ado:
|
552 [+]
|
qui
gen
double `wt_e2' = .7^(`timevar'-r(tmin))*$Te2 /*
*/
if `touse'
|
|
:
|
1131 [+]
|
qui
gen
double $Te_tarch = ($Te > 0)*$Te2
|
|
base/a/arch_dr.ado:
|
86 [+]
|
qui
gen
double `wt_e2' = /*
*/ .7^($Ttimevar-$Ttimemin)*$Te2 /*
*/
if $ML_samp
|
|
:
|
208 [+]
|
qui
gen
double `wt_e2' = /*
*/ .7^($Ttimevar-$Ttimemin)*$Te2
if $ML_samp
|
|
base/b/boxcox_p.ado:
|
80 [+]
|
gen
`vtyp' `varn' = (e(L)*`xb'+1)^(1/e(L)) /*
*/
if `touse'
|
|
base/b/bsample.ado:
|
168 [+]
|
gen
`r' = int(uniform()*`nmax' + 1)
|
|
:
|
357 [+]
|
gen
double `r' = int(uniform()*`nclust' + 1)
in 1/`nclust'
|
|
:
|
539 [+]
|
by `strata' `clid' `obsid':
replace
`r' = (`clid'-1)*`nclust'+_n-1
|
|
:
|
574 [+]
|
by `strata' `clid' `obsid':
replace
`r' = (`clid'-1)*`nclust'+_n-1
|
|
base/b/bsample_7.ado:
|
99 [+]
|
gen
double `r' = int(uniform()*`nclust' + 1)
in 1/`nclust'
|
|
:
|
115 [+]
|
by `clid' `obsid':
replace
`r' = (`clid'-1)*`nclust'+_n-1
|
|
base/c/clogit.ado:
|
654 [+]
|
qui by `touse' `group':
gen
double `i' = (_n==1&`touse')*`freq'
|
|
base/c/cluster.ado:
|
2291 [+]
|
qui by `tousevar' :
gen
long `grpvar' = /*
*/ int(((_n-1)/_N)*`k') + 1
if `tousevar'
|
|
:
|
2391 [+]
|
qui
replace
`var'=uniform()*`vrange'+`vmin' /*
*/
in `Np1'/`newN'
|
|
base/c/cluster_tree_8.ado:
|
905 [+]
|
qui
gen
double `cind' = `lbuf' + (`ncols'-`rbuf'-`lbuf')*`atx'/`maxx' /*
*/
if `atx' < .
|
|
base/c/cusum.ado:
|
44 [+]
|
replace
`x' = `x'+uniform()*`jx'
-
/*
To avoid ties and ensure a unique sort order for x,
randomly jitter x by .00001 times its range using a fixed seed
Answer: No, setting the seed screws up Monte Carlo experiments.
*/
replace `x' = `x'+uniform()*`jx'
|
|
base/c/cusum_7.ado:
|
27 [+]
|
replace
`x' = `x'+uniform()*`jx'
-
/*
To avoid ties and ensure a unique sort order for x,
randomly jitter x by .00001 times its range using a fixed seed
Answer: No, setting the seed screws up Monte Carlo experiments.
*/
replace `x' = `x'+uniform()*`jx'
|
|
base/d/dfgls.ado:
|
126 [+]
|
gen
double `dty'=`varlist'-_b[`iota']-_b[`qdtrd']*`trd'
|
|
base/d/dvech_p.ado:
|
700 [+]
|
qui
predict
double `res'*
if `touse'
, residuals
|
|
base/e/ereg.ado:
|
172 [+]
|
gen
double `lnf' = `wv' * ///
(`d'*`cons'-exp(`cons')*`realt')
|
|
base/e/ereg_lf.ado:
|
13 [+]
|
quietly
replace
`g1' = $ML_y2-exp(`I')*$ML_y1
|
|
base/e/ereg_p.ado:
|
348 [+]
|
gen
`typlist' `varlist' = `minus'(`d'-exp(`minus'`I')*`t')
if `touse'
|
|
base/e/ereghet_glf.ado:
|
22 [+]
|
gen
double `b' = exp(`beta')*`t'
if $ML_samp
|
|
:
|
23 [+]
|
gen
double `b0' = cond(`t0'>0, exp(`beta')*`t0',0) /*
*/
if $ML_samp
|
|
base/e/ereghet_gp.ado:
|
206 [+]
|
qui
gen
double `ff'= 1+`theta'*exp(`xb')*`t'
if `touse'
|
|
:
|
207 [+]
|
qui
gen
double `ff0'= 1+`theta'*exp(`xb')*`t0' /*
*/
if `t0'>0 & `touse'
|
|
:
|
236 [+]
|
qui
gen
double `ff'= /*
*/ (`d'!=0)-(1/`theta')* /*
*/ ln(1+`theta'*exp(`xb')*`t')
if `touse'
|
|
:
|
239 [+]
|
qui
replace
/*
*/ `ff'=`ff'+(1/`theta')* /*
*/ ln(1+`theta'*exp(`xb')*`t0') /*
*/
if `t0'>0 & `touse'
|
|
base/e/ereghet_ilf.ado:
|
21 [+]
|
gen
double `b' = exp(`beta')*`t'
if $ML_samp
|
|
:
|
22 [+]
|
gen
double `b0' = cond(`t0'>0, exp(`beta')*`t0',0) /*
*/
if $ML_samp
|
|
:
|
53 [+]
|
gen
double `dt' = `th'*(`f'*`f'/`c' - cond(`t0'>0, /*
*/ `f0'*`f0'/`c0',0) - `d'*`f'/`c'* /*
*/ (1-2*`th'*`f'/`c'))
|
|
base/e/ereghet_ilf_sh.ado:
|
97 [+]
|
replace
`dz' = cond(`sumd'<., /*
*/ -(1/`c' - 1)*`ith'^2 + /*
*/ `c'*`sums'*(`a'*`sums' - `ith') , 0) /*
*/
if $ML_samp
|
|
base/e/ereghet_ip.ado:
|
206 [+]
|
qui
gen
double `ff'= 1+2*`theta'*exp(`xb')*`t'
if `touse'
|
|
:
|
207 [+]
|
qui
gen
double `ff0'= 1+2*`theta'*exp(`xb')*`t0' /*
*/
if `t0'>0 & `touse'
|
|
:
|
236 [+]
|
qui
gen
double `ff'= /*
*/ (`d'!=0)+(1/`theta')* /*
*/ (1-sqrt(1+2*`theta'*exp(`xb')*`t'))
if `touse'
|
|
:
|
239 [+]
|
qui
replace
/*
*/ `ff'=`ff'-(1/`theta')* /*
*/ (1-sqrt(1+2*`theta'*exp(`xb')*`t0')) /*
*/
if `t0'>0 & `touse'
|
|
base/e/etpoisson_p.ado:
|
111 [+]
|
gen
`typlist' `varlist' = ///
exp(((`sigma'^2)/2))* ///
(exp(`xb1')-exp(`xb0'))*`onswitch'
|
|
base/f/fpredict.ado:
|
106 [+]
|
quietly
gen
`type' `newvar'=`RSTU'*`RES'/sqrt((1-`HAT')*`SRES'[_N])
|
|
base/f/frac_mun.ado:
|
9 [+]
|
cap
drop
`name'*
All properties
| key |
content |
| command |
drop |
| indent |
2 |
| parameters |
`name'* |
| prefix |
cap |
|
|
base/f/fracpred.ado:
|
173 [+]
|
replace
`v' = `v'+((`j'<`i')+1)*`V'[`i',`j']*`xi'*`xj'
|
|
:
|
184 [+]
|
replace
`v'=`v'+2*`V'[`ncons',`i']*`xi'
|
|
:
|
201 [+]
|
replace
`v'=`v'+`xb'_b[`xi']*`xi'
|
|
base/f/fron_p.ado:
|
163 [+]
|
gen
`vtyp' `varn'=`mu1'+`sigma1'* /*
*/ (normd(-`z')/norm(`z')) /*
*/
if `cond'
|
|
base/f/fron_tn.ado:
|
45 [+]
|
qui
gen
double `w1' = (1-`gamma')*`zd' /*
*/ - $S_COST*`gamma'*(`ytilde'-`xb')
|
|
:
|
70 [+]
|
qui
gen
double `dditdg' = -.5*`zd'*(`gamma'^(-1.5))*`dgt'
|
|
:
|
81 [+]
|
qui
gen
double `gj2' = -(`ytilde'-`xb'+$S_COST*`zd')*$S_COST /*
*/ - `ratio1'/sqrt(`gamma') /*
*/ + `ratio2'*`dditsdzd'
|
|
:
|
90 [+]
|
qui
gen
double `dw1' = (-`zd'-$S_COST*(`ytilde'-`xb'))*`dgt'
|
|
:
|
122 [+]
|
qui
gen
double `d2w2' = `dw2'*(-0.5/`gamma'+0.5/(1-`gamma'))*`dgt' /*
*/ + `w2'*(0.5/(`gamma'^2)+0.5/(1-`gamma')^2)*`dgt'*`dgt' /*
*/ + `w2'*(-0.5/`gamma'+0.5/(1-`gamma'))*`d2gdg2'
|
|
base/g/gamhet_gp.ado:
|
144 [+]
|
gen
`vtyp' `varn'=exp(`sgn'sqrt(`ga')*`sigma'* /*
*/ ln(`cc'/`ga') + `xb')
if `touse'
|
|
:
|
165 [+]
|
gen
`vtyp' `varn'=(`sgn'sqrt(`ga')*`sigma'* /*
*/ ln(`cc'/`ga') + `xb')
if `touse'
|
|
:
|
203 [+]
|
qui
gen
double `ff'= exp(-`uu')*`uu'^(`ga'-1)* /*
*/ exp(-lngamma(`ga'))*`uu'/(sqrt(`ga')*`sigma'*`t') /*
*/
if `touse'
|
|
base/g/gamhet_ip.ado:
|
144 [+]
|
gen
`vtyp' `varn'=exp(`sgn'sqrt(`ga')*`sigma'* /*
*/ ln(`cc'/`ga') + `xb')
if `touse'
|
|
:
|
165 [+]
|
gen
`vtyp' `varn'=(`sgn'sqrt(`ga')*`sigma'* /*
*/ ln(`cc'/`ga') + `xb')
if `touse'
|
|
:
|
203 [+]
|
qui
gen
double `ff'= exp(-`uu')*`uu'^(`ga'-1)* /*
*/ exp(-lngamma(`ga'))*`uu'/(sqrt(`ga')*`sigma'*`t') /*
*/
if `touse'
|
|
base/g/gamma_d2.ado:
|
66 [+]
|
replace
`g1' = `dIdx'*`u'/ /*
*/ (sqrt(`l')*`sig'*`et')
if $ML_samp
|
|
:
|
74 [+]
|
replace
`g1' = `g1' - /*
*/ `dI0dx'*`u0'/ /*
*/ (sqrt(`l')*`sig'*`et0')
if $ML_samp & `t0'>0
|
|
:
|
80 [+]
|
replace
`g2' = `u'*`z'*sign(`k')* /*
*/ `dIdx' / /*
*/ (sqrt(`l')*`et')
if $ML_samp
|
|
:
|
84 [+]
|
replace
`g2' = `g2' - `d'* `g2'
All properties
| key |
content |
| command |
replace |
| indent |
2 |
| parameters |
`g2' = `g2' - `d'* `g2' |
|
|
:
|
86 [+]
|
replace
`g2' = `g2' + `d'*( /*
*/ (`z'* sqrt(`l'))*(`u'/`l' - 1) - 1)
if $ML_samp
|
|
:
|
89 [+]
|
replace
`g2' = `g2' - `u0'*`z0'*sign(`k')* /*
*/ `dI0dx'/ /*
*/ (sqrt(`l')*`et0')
if $ML_samp & `t0' > 0
|
|
:
|
95 [+]
|
replace
`g3' = (2.0*`l'*sqrt(`l')*`detl' - /*
*/ (`z' - 2.0*sqrt(`l'))* /*
*/ `dIdx'*`u')/`et'
if $ML_samp
|
|
:
|
101 [+]
|
replace
`g3' = `g3' + `d'* /*
*/ (-2.0*sign(`k')*`l'*sqrt(`l')* /*
*/ (ln(`l') +(`l' -0.5)/`l' - digamma(`l')) - /*
*/ sign(`k')*`z'*`l' - /*
*/ sign(`k')*`u'*(`z' - 2.0*sqrt(`l')))
if $ML_samp
|
|
:
|
107 [+]
|
replace
`g3' = `g3' - /*
*/ (2.0*`l'*sqrt(`l')*`det0l' - /*
*/ (`z0' - 2.0*sqrt(`l'))* /*
*/ `dI0dx'*`u0')/`et0'/*
*/
if $ML_samp & `t0'> 0
|
|
:
|
127 [+]
|
gen
double `d11' = (-`et'*`u'*sign(`k')*(`d2Idxdx'*`u' + /*
*/ `dIdx') - `u'^2*`dIdx'^2)/((`et'^2)*`l'*`sig'^2)
if $ML_samp
|
|
:
|
137 [+]
|
replace
`d11' = (1 - `d')*`d11'
if $ML_samp
|
|
:
|
141 [+]
|
replace
`d11' = `d11' - (-`et0'*`u0'*sign(`k')*(`d2I0dxdx' /*
*/ *`u0' + `dI0dx') - `u0'^2*`dI0dx'^2)/(`et0'^2*`l'*`sig'^2)/*
*/
if $ML_samp & `t0'>0
|
|
:
|
153 [+]
|
generate
double `d12' = -`u'*`z'*(`dIdx' +`u'*`d2Idxdx')/ /*
*/ (`et'*`l'*`sig') - `u'*`dIdx'*(`et'*sqrt(`l') + /*
*/ sign(`k')*`dIdx'*`u'*`z')/(`et'^2*`l'*`sig')
if $ML_samp
|
|
:
|
164 [+]
|
replace
`d12' = (1 - `d')*`d12'
if $ML_samp
|
|
:
|
169 [+]
|
replace
`d12' = `d12' +`u0'*`z0'*(`dI0dx' +`u0'*`d2I0dxdx')/ /*
*/ (`et0'*`l'*`sig') + `u0'*`dI0dx'*(`et0'*sqrt(`l') + /*
*/ sign(`k')*`dI0dx'*`u0'*`z0')/(`et0'^2*`l'*`sig') /*
*/
if $ML_samp & `t0'> 0
|
|
:
|
182 [+]
|
generate
double `d13' = `u'*sign(`k')* /*
*/ ((`z'-2*sqrt(`l'))*(`dIdx'/*
*/ + `u'*`d2Idxdx') - 2*`l'*sqrt(`l')*`d2Idadx')/ /*
*/ (`et'*sqrt(`l')*`sig') - `u'*`dIdx'*(2*`l'*sqrt(`l')* /*
*/ `detl' - sign(`k')*sqrt(`l')*`et' - /*
*/ `u'*(`z' - 2*sqrt(`l'))*`dIdx')/((`et'^2)*sqrt(`l')*`sig')/*
*/
if $ML_samp
|
|
:
|
209 [+]
|
replace
`d13' = (1 - `d')*`d13'
if $ML_samp
|
|
:
|
214 [+]
|
generate
double `d130' = /*
*/ `u0'*sign(`k')*((`z0'-2*sqrt(`l'))*(`dI0dx'/*
*/ + `u0'*`d2I0dxdx') - 2*`l'*sqrt(`l')*`d2I0dadx')/ /*
*/ (`et0'*sqrt(`l')*`sig') - `u0'*`dI0dx'*(2*`l'*sqrt(`l')* /*
*/ `det0l' - sign(`k')*sqrt(`l')*`et0' - /*
*/ `u0'*(`z0' - 2*sqrt(`l'))*`dI0dx')
|
|
:
|
245 [+]
|
generate
double `d22' = (-`et'*sign(`k')*`u'*`z' /*
*/ *(`d2Idxdx'*`u'*`z' + `z'*`dIdx' + sqrt(`l')*`dIdx') - /*
*/ (`u'*`z')^2*`dIdx'^2)/(`et'^2*`l')
if $ML_samp
|
|
:
|
257 [+]
|
replace
`d22' = (1-`d')*`d22'
if $ML_samp
|
|
:
|
262 [+]
|
replace
`d22' = `d22' - /*
*/ (-`et0'*sign(`k')*`u0'*`z0' /*
*/ *(`d2I0dxdx'*`u0'*`z0' + `z0'*`dI0dx' + /*
*/ sqrt(`l')*`dI0dx') - /*
*/ (`u0'*`z0')^2*`dI0dx'^2)/(`et0'^2*`l') /*
*/
if $ML_samp & `t0' > 0
|
|
:
|
278 [+]
|
generate
double `d23' = `u'*`z'*(`et'*sqrt(`l')*( /*
*/ (`z'-2*sqrt(`l'))*(`u'*`d2Idxdx' + `dIdx') - /*
*/ 2*`d2Idadx'*`l'*sqrt(`l')) - sign(`k')*`dIdx'*( /*
*/ -`dIdx'*sqrt(`l')*`u'*(`z' - 2*sqrt(`l')) + /*
*/ 2*`detl'*`l'^2 - `et'*sign(`k')*`l'))/(`et'^2*`l') /*
*/
if $ML_samp
|
|
:
|
296 [+]
|
replace
`d23' = (1-`d')*`d23'
if $ML_samp
|
|
:
|
298 [+]
|
replace
`d23' = `d23' + `d'* /*
*/ sign(`k')*(`z'*`u'+ `z'*`l' + /*
*/ `z'*`u'*(`z'- 2*sqrt(`l'))/sqrt(`l')) /*
*/
if $ML_samp
|
|
:
|
303 [+]
|
replace
`d23' = `d23' - /*
*/ `u0'*`z0'*(`et0'*sqrt(`l')*( /*
*/ (`z0'-2*sqrt(`l'))*(`u0'*`d2I0dxdx' + `dI0dx') - /*
*/ 2*`d2I0dadx'*`l'*sqrt(`l')) - sign(`k')*`dI0dx'*( /*
*/ -`dI0dx'*sqrt(`l')*`u0'*(`z0' - 2*sqrt(`l')) + /*
*/ 2*`det0l'*`l'^2 - `et0'*sign(`k')*`l'))/(`et0'^2*`l') /*
*/
if $ML_samp & `t0' > 0
|
|
:
|
326 [+]
|
generate
double `d33' = 2*sign(`k')*`l'^2*(-3*`detl' /*
*/ + `u'*(`z'-2*sqrt(`l'))*`d2Idadx'/sqrt(`l') /*
*/ - 2*`l'*`ddetl')/`et'
if $ML_samp
|
|
:
|
330 [+]
|
replace
`d33' = `d33' - 2*`l'*sqrt(`l')*`detl'*( /*
*/ -`u'*(`z' - 2*sqrt(`l'))*`dIdx' /*
*/ + 2*`l'*sqrt(`l')*`detl')/(`et'^2)
if $ML_samp
|
|
:
|
334 [+]
|
replace
`d33' = `d33' - sign(`k')*`u'*( /*
*/ ((`z'-2*sqrt(`l'))^2)*(`dIdx' + `u'*`d2Idxdx') /*
*/ + 2*`l'*`dIdx' /*
*/ - 2*`l'*sqrt(`l')*(`z'-2*sqrt(`l'))*`d2Idadx')/`et' /*
*/
if $ML_samp
|
|
:
|
340 [+]
|
replace
`d33' = `d33' + `u'*(`z'-2*sqrt(`l'))*`dIdx'* /*
*/ (-`u'*(`z'-2*sqrt(`l'))*`dIdx' /*
*/ + 2*`l'*sqrt(`l')*`detl')/(`et'^2)
if $ML_samp
|
|
:
|
345 [+]
|
replace
`d33' = (1-`d')*`d33'
if $ML_samp
|
|
:
|
355 [+]
|
replace
`d33' = `d33' - 2*sign(`k')*(`l'^2)*(-3*`det0l' /*
*/ + `u0'*(`z0'-2*sqrt(`l'))*`d2I0dadx'/sqrt(`l') /*
*/ - 2*`l'*`ddet0l')/`et0'
if $ML_samp & `t0'>0
|
|
:
|
359 [+]
|
replace
`d33' = `d33' + 2*`l'*sqrt(`l')*`det0l'*( /*
*/ -`u0'*(`z0' - 2*sqrt(`l'))*`dI0dx' /*
*/ + 2*`l'*sqrt(`l')*`det0l')/(`et0'^2)
if $ML_samp & `t0'>0
|
|
:
|
363 [+]
|
replace
`d33' = `d33' + sign(`k')*`u0'*( /*
*/ ((`z0'-2*sqrt(`l'))^2)*(`dI0dx' + `u0'*`d2I0dxdx') /*
*/ + 2*`l'*`dI0dx' /*
*/ - 2*`l'*sqrt(`l')*(`z0'-2*sqrt(`l'))*`d2I0dadx')/`et0' /*
*/
if $ML_samp & `t0'>0
|
|
:
|
369 [+]
|
replace
`d33' = `d33' - `u0'*(`z0'-2*sqrt(`l'))*`dI0dx'* /*
*/ (-`u0'*(`z0'-2*sqrt(`l'))*`dI0dx' /*
*/ + 2*`l'*sqrt(`l')*`det0l')/(`et0'^2)
if $ML_samp & `t0'>0
|
|
base/g/gamma_p.ado:
|
148 [+]
|
qui
replace
`varn'= `sgn'*log(`varn')*`sigma' /*
*/ +(abs(`kappa')*`xb')
|
|
:
|
234 [+]
|
qui
gen
double `ff'=((`l'-0.5)*ln(`l')) /*
*/ + (`z'*sqrt(`l'))-`l'*exp(`z'/sqrt(`l')) /*
*/ -lngamma(`l') - ln(`t'* `sigma')
if `touse'
|
|
base/g/glim_l01.ado:
|
19 [+]
|
gen
double `mu' = `eta'*$SGLM_m
|
|
base/g/glim_l04.ado:
|
20 [+]
|
gen
double `return' = `mu'*(1+`mu'*$SGLM_a)
|
|
:
|
24 [+]
|
gen
double `return' = `mu'*(1+`mu'*$SGLM_a)*(1+2*`mu'*$SGLM_a)
|
|
base/g/glim_l09.ado:
|
27 [+]
|
gen
double `return' = 2*`mu'*`mu'*`mu'/($SGLM_m*$SGLM_m)
|
|
base/g/glim_l11.ado:
|
23 [+]
|
gen
double `return' = `mu'^(1-$SGLM_p)*$SGLM_m^$SGLM_p/$SGLM_p
|
|
:
|
27 [+]
|
gen
double `return' = `mu'^(1-2*$SGLM_p)*(1/$SGLM_p)* /*
*/ (1/$SGLM_p-1)*$SGLM_m^$SGLM_p
|
|
base/g/glim_lf.ado:
|
33 [+]
|
qui
replace
`score' = ($ML_y1 - `mu')/(`phi'*`v')*`dmu'
if $ML_samp
|
|
base/g/glim_p.ado:
|
211 [+]
|
qui
gen
double `pt' = _b[`t']*`t'
|
|
base/g/glim_v6.ado:
|
31 [+]
|
gen
double `return' = `mu'+`mu'*`mu'*$SGLM_a
|
|
:
|
43 [+]
|
gen
double `return' = cond(`y'==0, /*
*/ 2*ln(1+`mu'*$SGLM_a)/$SGLM_a, /*
*/ 2*(`y'*ln(`y'/`mu') - /*
*/ (1+`y'*$SGLM_a)/$SGLM_a * /*
*/ ln((1+`y'*$SGLM_a)/(1+`mu'*$SGLM_a))))
|
|
:
|
90 [+]
|
gen
double `return' = (2 - `mu') / sqrt(`mu'+`mu'*`mu'*$SGLM_a)
|
|
base/g/glm.ado:
|
2140 [+]
|
qui
replace
`vt1' = `x'[_n-`j']*`res'*`res'[_n-`j']* /*
*/ `wv'[_n-`j']
if `touse'
|
|
base/g/glm_p.ado:
|
122 [+]
|
gen
double `V' = (`mu'+`e(k)'*`mu'^2)
if `touse'
|
|
base/g/glmpred.ado:
|
118 [+]
|
gen
double `V' = (`mu'+`e(k)'*`mu'^2)
|
|
base/g/gmm.ado:
|
1118 [+]
|
qui
replace
`normwt' = r(N)*`normwt'/r(sum)
|
|
base/g/gomp_lf.ado:
|
29 [+]
|
gen
double `et0' = exp(`g'*$EREGt0)
|
|
:
|
43 [+]
|
replace
`B' = `B' - (`L'/`g')*((`et'*`t')-(`et0'*$EREGt0))
|
|
base/g/gomper_p.ado:
|
128 [+]
|
gen
`vtyp' `varn'=(1/`gamma')* /*
*/ (ln(exp(`xb') + ln(2)*`gamma') - `xb')
if `touse'
|
|
base/g/gompertz.ado:
|
144 [+]
|
gen
double `den' = sum(`wvn'*(`t'-$EREGt0)*`touse')
|
|
base/g/gompertzhet.ado:
|
225 [+]
|
gen
double `den' = sum(`wvn'*(`t'-$EREGt0)*`touse')
|
|
base/g/gomphet_glf.ado:
|
81 [+]
|
replace
`c0' = cond(`t0'>0, /*
*/ (-`f0'+exp(`beta')*`th'*(`t0'*`t0'* /*
*/ exp(`ga'*`t0')- /*
*/ `t0'*exp(`ga'*`t0')/`ga' + (exp(`ga'*`t0')-1)/ /*
*/ (`ga'*`ga')))/`ga',0)
|
|
base/g/gomphet_glf_sh.ado:
|
31 [+]
|
gen
double `logs' = exp(`beta')/`gam'* /*
*/ (`expgt0' - `expgt')
if $ML_samp
|
|
base/g/gomphet_ilf.ado:
|
41 [+]
|
gen
double `f' = (2*`th'*exp(`beta')*`t'* /*
*/ exp(`ga'*`t')-`b')/`ga'
if $ML_samp
|
|
:
|
43 [+]
|
gen
double `f0' = cond(`t0'>0,(2*`th'*exp(`beta')*`t0'* /*
*/ exp(`ga'*`t0')-`b0')/`ga',0)
if $ML_samp
|
|
base/g/gomphet_ilf_sh.ado:
|
32 [+]
|
gen
double `logs' = exp(`beta')/`gam'* /*
*/ (`expgt0' - `expgt')
if $ML_samp
|
|
:
|
128 [+]
|
replace
`dz' = cond(`sumd'<., /*
*/ -(1/`c' - 1)*`ith'^2 + /*
*/ `c'*`sums'*(`a'*`sums' - `ith') , 0) /*
*/
if $ML_samp
|
|
base/g/gomphet_ip.ado:
|
175 [+]
|
qui
gen
double `ff'= `kk'/sqrt(1+2*`theta'/`gamma'* /*
*/ (`kk'-exp(`xb')))
if `touse'
|
|
base/g/gsem.ado:
|
31 [+]
|
capture
drop
`GSEM'*
All properties
| key |
content |
| command |
drop |
| indent |
1 |
| parameters |
`GSEM'* |
| prefix |
capture |
|
|
base/g/gsem_p.ado:
|
8 [+]
|
capture
drop
`tname'*
All properties
| key |
content |
| command |
drop |
| indent |
1 |
| parameters |
`tname'* |
| prefix |
capture |
|
|
base/g/gsem_parse.ado:
|
256 [+]
|
capture
drop
`GSEM'*
All properties
| key |
content |
| command |
drop |
| indent |
1 |
| parameters |
`GSEM'* |
| prefix |
capture |
|
|
base/h/hadimvo.ado:
|
144 [+]
|
replace
`D'=(`r'-1)*`D'/`cf'
All properties
| key |
content |
| command |
replace |
| indent |
2 |
| parameters |
`D'=(`r'-1)*`D'/`cf' |
|
|
:
|
169 [+]
|
replace
`D'=(`r'-1)*`D'/`cf'
All properties
| key |
content |
| command |
replace |
| indent |
3 |
| parameters |
`D'=(`r'-1)*`D'/`cf' |
|
|
base/h/heck_d2.ado:
|
34 [+]
|
qui
gen
double `eta' = (`Is' + /*
*/ ($ML_y1-`Ir')*`rho'/`sig') / sqrt(1-`rho'^2)
|
|
:
|
59 [+]
|
qui
replace
`sc3' = /*
*/ cond(`y2',`M'*(`ym'*`rr'+`eta'*`rho'*`rr'^2)*`dlr',0)
|
|
base/h/heckma_p.ado:
|
209 [+]
|
label
var `varn' "E(`depname'*|Pr(`selname'))"
|
|
base/h/hereg.ado:
|
123 [+]
|
gen
`score' = (`Fakedv'-`predz')*`hess'
|
|
base/i/ipolate.ado:
|
61 [+]
|
by `touse' `by':
replace
`z'=`m'[_N]*`x'+`b'[_N] /*
*/
if `touse' & `ismiss'
|
|
:
|
72 [+]
|
by `touse' `by':
replace
`z'=`M'[_N]*`x'+`B'[_N] /*
*/
if `touse' & `ismiss'
|
|
base/i/ivpoisson.ado:
|
558 [+]
|
qui
replace
`normwt' = r(N)*`normwt'/r(sum)
|
|
base/i/ivregress.ado:
|
255 [+]
|
qui
replace
`normwt' = r(N)*`normwt'/r(sum)
if `touse'
|
|
base/i/ivregress_estat.ado:
|
1281 [+]
|
qui
replace
`normwt' = r(N)*`normwt' / r(sum)
|
|
base/k/kdensity.ado:
|
207 [+]
|
qui
replace
`m' = r(min)-`wwidth'+(_n-1)*`delta'
in 1/`n'
|
|
base/k/kdensity_7.ado:
|
128 [+]
|
qui
replace
`m' = r(min)-`wwidth'+(_n-1)*`delta'
in 1/`n'
|
|
:
|
178 [+]
|
qui
replace
`tden' = `tden'/(`ft'[_N]*`scale')
|
|
base/l/lfit.ado:
|
348 [+]
|
gen
double `qx' = cond(`m'==1, `dw'*`x'[1]/`w'[1],
cond((_n-1)*`dw'>=`w'[`m'-1],
`dw'*(`x'[`m']-`x'[`m'-1])/(`w'[`m']-`w'[`m'-1]),
(_n*`dw'-`w'[`m'-1])
+ `x'[`m'-1] ))
in 1/`group'
-
*(`x'[`m']-`x'[`m'-1])/(`w'[`m']-`w'[`m'-1])
gen double `qx' = cond(`m'==1, `dw'*`x'[1]/`w'[1],
cond((_n-1)*`dw'>=`w'[`m'-1],
`dw'*(`x'[`m']-`x'[`m'-1])/(`w'[`m']-`w'[`m'-1]),
(_n*`dw'-`w'[`m'-1])
+ `x'[`m'-1] ))
in 1/`group'
|
|
:
|
355 [+]
|
replace
`qx' = `qx' - `x'[`m'[_n-1]]
+ cond(`m'[_n-1]==1,
(`w'[1]-(_n-1)*`dw')*`x'[1]/`w'[1],
(`w'[`m'[_n-1]]-(_n-1)*`dw')
/(`w'[`m'[_n-1]]-`w'[`m'[_n-1]-1]) )
in 2/`group'
if `m'>1 & (_n-1)*`dw'<`w'[`m'-1]
-
*(`x'[`m'[_n-1]]-`x'[`m'[_n-1]-1])
replace `qx' = `qx' - `x'[`m'[_n-1]]
+ cond(`m'[_n-1]==1,
(`w'[1]-(_n-1)*`dw')*`x'[1]/`w'[1],
(`w'[`m'[_n-1]]-(_n-1)*`dw')
/(`w'[`m'[_n-1]]-`w'[`m'[_n-1]-1]) )
in 2/`group'
if `m'>1 & (_n-1)*`dw'<`w'[`m'-1]
|
|
base/l/lloghet_glf.ado:
|
42 [+]
|
replace
`g3' = -`a'*`th'*exp(-`c')*`f' + /*
*/ (`c'-`c0')/`th' + exp(-`c0')*`f0'
|
|
:
|
45 [+]
|
replace
`b' = (`b'-1)*`ga'/`b'
All properties
| key |
content |
| command |
replace |
| indent |
2 |
| parameters |
`b' = (`b'-1)*`ga'/`b' |
|
|
:
|
46 [+]
|
replace
`b0' = cond(`t0'>0,(`b0'-1)*`ga'/`b0',0)
|
|
:
|
55 [+]
|
replace
`g2' = -`a'*`th'*exp(-`c')*`b' + exp(-`c0')*`b0' + /*
*/ `d'*(`ga'*(`beta'-ln(`t'))-1-`b')
|
|
:
|
68 [+]
|
gen
double `h' = -`b'*`ga'* /*
*/ (-`b'*(`t'*exp(-`beta'))^(-`ga')+1)
if $ML_samp
|
|
:
|
70 [+]
|
gen
double `h0' = cond(`t0'>0,-`b0'*`ga'* /*
*/ (-`b0'*(`t0'*exp(-`beta'))^(-`ga')+1),0)
if $ML_samp
|
|
base/l/lloghet_glf_sh.ado:
|
64 [+]
|
gen
double `logst' = `iga'*( (1-1/`F')*`lntmu' - /*
*/ (1-1/`F0')*`lntmu0' )
|
|
base/l/lloghet_ilf.ado:
|
54 [+]
|
replace
`g1' = `ga'*(`f'*`c' - `f0'*`c0' + `d'* /*
*/ (`f'*(1+`th'*`c'*`c') - 1))
|
|
:
|
61 [+]
|
replace
`g2' = (`h0'*`c0' - `h'*`c')/`ga' - `d'* /*
*/ (1 + ln(`t')*`ga' - `beta'*`ga' + `h'/`ga'* /*
*/ (`th'*`c'*`c'+1))
|
|
base/l/lloghet_ilf_sh.ado:
|
67 [+]
|
gen
double `logst' = `iga'*((1-1/`F')*`lntmu' - /*
*/ (1-1/`F0')*`lntmu0' )
|
|
:
|
144 [+]
|
replace
`dz' = cond(`sumd'<., /*
*/ -(1/`c' - 1)*`ith'^2 + /*
*/ `c'*`sums'*(`a'*`sums' - `ith') , 0) /*
*/
if $ML_samp
|
|
base/l/lloghet_ip.ado:
|
137 [+]
|
gen
`vtyp' `varn'=exp(`xb')*`cc'
if `touse'
|
|
base/l/lnorm_lf.ado:
|
40 [+]
|
qui
replace
`w1'=`d'*( (1/`es')*`lntxb' - `R'/`es') /*
*/ + `R'/`es' - cond(`t0'>0, `R0'/`es', 0)
|
|
:
|
58 [+]
|
gen
double `f'=`d'*( (-1/`e2s') /*
*/ -(1/`e2s')*((`lntxb')*`net'*`et' /*
*/ -`net'*`net' )/(`et'*`et') ) /*
*/ +(1/`e2s')*((`lntxb')*`net'*`et' /*
*/ -`net'*`net' )/(`et'*`et')
|
|
:
|
70 [+]
|
replace
`f'=`d'*((-2/`es')*`lntxb' /*
*/ -(1/`es')* ( -`R'+ ((`lntxb'^2)*`net'*`et' /*
*/ -`net'*`net'*`lntxb')/(`et'*`et')) ) /*
*/ +(1/`es')* ( -`R'+ ((`lntxb'^2)*`net'*`et' /*
*/ -`net'*`net'*`lntxb')/(`et'*`et'))
|
|
:
|
76 [+]
|
replace
`f'=`f'-(1/`es')* ( -`R0'+ /*
*/ ((`lntxb0'^2)*`net0'*`et0' /*
*/ -`net0'*`net0'*`lntxb0')/(`et0'*`et0')) /*
*/
if `t0'>0
|
|
:
|
84 [+]
|
replace
`f'=`d'*( -2*(`lntxb'^2) /*
*/ -`lntxb'*( ( (`lntxb'^2)*`net'*`et' /*
*/ -`net'*`net'*`lntxb') /(`et'*`et')) /*
*/ +`lntxb'*`R' ) /*
*/ +`lntxb'*(( (`lntxb'^2)*`net'*`et' /*
*/ -`net'*`net'*`lntxb')/(`et'*`et')) /*
*/ -`lntxb'*`R'
|
|
:
|
91 [+]
|
replace
`f'=`f' /*
*/ -`lntxb0'*(((`lntxb0'^2)*`net0'*`et0' /*
*/ -`net0'*`net0'*`lntxb0') /(`et0'*`et0')) /*
*/ +`lntxb0'*`R0'
if `t0'>0
|
|
base/l/lnormhet_ilf.ado:
|
77 [+]
|
replace
`c' = `f'*(`c'-`th'*`h'*`h'*`f'*`f') - /*
*/ `d'*(-1+2*`th'*`th'*`h'*`h'*(`f'^4) + /*
*/ (1-`th'*`f'*`f')*`c')
|
|
base/l/lnormhet_ilf_sh.ado:
|
148 [+]
|
replace
`dz' = cond(`sumd'<., /*
*/ -(1/`c' - 1)*`ith'^2 + /*
*/ `c'*`sums'*(`a'*`sums' - `ith') , 0) /*
*/
if $ML_samp
|
|
base/l/logis_lf.ado:
|
33 [+]
|
qui
replace
`w1'=-(`d'*`g'-(1+`d')*`et'*`g'/(1+`et'))
|
|
:
|
40 [+]
|
qui
replace
`w2'=-(`d'*(`I'*`g' +1+`g'*log(`t')) /*
*/ -(1+`d')*`et'*(`I'+log(`t'))*`g'/(1+`et'))
|
|
:
|
42 [+]
|
qui
replace
`w2' =`w2' - `et0'*(`I'+log(`t0'))*`g'/(1+`et0') /*
*/
if `t0'> 0
|
|
:
|
71 [+]
|
qui
replace
`C'=`d'*`g'*(`xblnt') /*
*/ -(1+`d')*`et'*`g'*`xblnt'* /*
*/ ((`xblnt'*`g')+1+`et')/(1+`et')^2
|
|
base/l/logit_p.ado:
|
231 [+]
|
by `keep' `rhs':
gen
long `y'=cond(_n==_N, /*
*/ sum((`e(depvar)'!=0 & `e(depvar)'<.)*`w'), .)
|
|
:
|
258 [+]
|
replace
`s' = `m'*`p'*(1-`p')*`s'*`s'
if `keep'
|
|
base/l/logrank.ado:
|
258 [+]
|
gen
double `wi' = sum( `ni'*(`n'-`ni')*`cons' )
|
|
base/l/lowess.ado:
|
208 [+]
|
replace
`ys' = `ys'* r(mean)/`mean'
if `touse'
|
|
base/l/lowess_7.ado:
|
147 [+]
|
replace
`ys' = `ys'* r(mean)/`mean'
if `touse'
|
|
base/l/lpoly.ado:
|
284 [+]
|
qui
replace
`xgrid' = r(min) + (_n - 1)*`delta'
in 1/`n'
|
|
base/l/lpredict.ado:
|
89 [+]
|
by `keep' `rhs':
gen
long `y'=cond(_n==_N, /*
*/ sum((`l'!=0 & `l'!=.)*`w') ,.)
|
|
:
|
111 [+]
|
replace
`new'=`m'*`p'*(1-`p')*`rthat'*`rthat'
|
|
base/l/lsens_x.ado:
|
23 [+]
|
gen
double `sumy' = sum((`y'==0)*`w')
if `touse'
|
|
:
|
29 [+]
|
replace
`sumy' = sum((`y'!=0)*`w')
if `touse'
|
|
base/l/ltable.ado:
|
207 [+]
|
gen
`H' = 2*`fail'/((2-`fail')*`dI')
|
|
base/l/ltable_7.ado:
|
131 [+]
|
gen
`H' = 2*`fail'/((2-`fail')*`dI')
|
|
base/l/ltable_9.ado:
|
183 [+]
|
gen
`H' = 2*`fail'/((2-`fail')*`dI')
|
|
base/m/mdslong.ado:
|
363 [+]
|
gen
`j12' = cond(`j1'<`j2', (`j1'-1)*`n'+`j2', (`j2'-1)*`n'+`j1')
|
|
base/m/merge_10.ado:
|
198 [+]
|
qui
recode
`_merge'?* (1 .=0) (2/5=1)
All properties
| key |
content |
| command |
recode |
| indent |
3 |
| parameters |
`_merge'?* (1 .=0) (2/5=1) |
| prefix |
qui |
|
|
base/m/mfp_10.ado:
|
445 [+]
|
cap
drop
`stub`i''*
All properties
| key |
content |
| command |
drop |
| indent |
2 |
| parameters |
`stub`i''* |
| prefix |
cap |
|
|
base/m/mgarch_dvech_p.ado:
|
719 [+]
|
qui
predict
double `res'*
if `touse'
, residuals
|
|
base/m/mhodds.ado:
|
239 [+]
|
qui by `touse' `strata' `by':
gen
double `pt'= /*
*/ sum((`d'+`h')*`wt')
if `touse'
|
|
:
|
244 [+]
|
qui by `touse' `strata' `by':
gen
double `p1'= /*
*/ sum((`d'+`h')*`e'*`wt')
if `touse'
|
|
:
|
246 [+]
|
qui by `touse' `strata' `by':
gen
double `p2' = /*
*/ sum((`d'+`h')*`e'*`e'*`wt')
if `touse'
|
|
base/m/ml_5.ado:
|
401 [+]
|
gen
double `sumff' = sum(`ff'*$S_mlwgt)
|
|
:
|
623 [+]
|
qui
gen
double `fatS' = sum(`fmhi'*$S_mlwgt)
|
|
:
|
672 [+]
|
qui
replace
`fatS' = sum(`fmhi'*$S_mlwgt)
|
|
base/n/nbreg.ado:
|
543 [+]
|
qui
replace
`z' = lngamma(`y'+exp(`z')) - lngamma(`y'+1) /*
*/ - lngamma(exp(`z')) + `lndelta'*`y' - (`y'+exp(`z'))*`lnoned' `if'
|
|
base/n/nbreg_al.ado:
|
45 [+]
|
qui
replace
`g2' = `y' - (`y'+`m')*`delta'/(1+`delta') - `g1' /*
*/
if $ML_samp
|
|
base/n/newey.ado:
|
165 [+]
|
replace
`vt1' = `x'*`e'* /*
*/ l`j'.`e'*l`j'.`wvar'* /*
*/ `ow'
if `touse'
|
|
base/n/newey_7.ado:
|
116 [+]
|
replace
`vt1' = `x'[_n-`j']*`e'* /*
*/ `e'[_n-`j']*`wvar'[_n-`j']* /*
*/ `ow'
if `touse'
|
|
base/n/nl_p.ado:
|
211 [+]
|
qui
replace
`varlist' = `plow'*`lb' + /*
*/ (1-`plow')*`e' /*
*/ if !mi(`lb') & mi(`ub') & `touse'
|
|
:
|
214 [+]
|
qui
replace
`varlist' = `pmid'*`e' + /*
*/ (1-`pmid')*`ub' /*
*/ if mi(`lb') & !mi(`ub') & `touse'
|
|
:
|
217 [+]
|
qui
replace
`varlist' = `plow' * `lb' + /*
*/ `pmid'*`e' + (1-`plow'-`pmid')*`ub' /*
*/ if !mi(`lb') & !mi(`ub') & `touse'
|
|
base/n/nlog_rd.ado:
|
110 [+]
|
qui
replace
`di' = /*
*/ (${ML_y`m'} - `p`j''*${ML_y`k'})
if `touse'
|
|
:
|
223 [+]
|
qui
replace
`ck' = cond($ML_y1,`Ij'* ///
(cond(${ML_y`l2'}==`jlev',1,0)+`dldtj'),0)
-
qui replace `ck' = cond($ML_y1,`Ij'* ///
(cond(${ML_y`l2'}==`jlev',1,0)+`dldtj'),0)
|
|
base/n/nlsur.ado:
|
493 [+]
|
qui
replace
`normwt' = r(N)*`normwt'/r(sum)
|
|
base/o/orthog.ado:
|
72 [+]
|
replace
`x`j'' = `x`j'' - r(mean)*`x`i''
|
|
:
|
100 [+]
|
replace
`x`j'' = `x`j'' - r(mean)*`x`i''
|
|
base/o/orthpoly.ado:
|
66 [+]
|
gen
double `q`i'' = (`a'*`x' + `b')*`q`j'' /*
*/ - `c'*`q`k''
if `doit'
|
|
base/p/probit_p.ado:
|
180 [+]
|
by `keep' `uorhs':
gen
long `y'=cond(_n==_N, /*
*/ sum((`e(depvar)'!=0 & `e(depvar)'<.)*`w'), .)
|
|
base/q/qreg_c.ado:
|
32 [+]
|
qui
replace
`r'=cond(`r'>=0,`quant',`quant'-1)*`r'
|
|
base/q/quantile.ado:
|
25 [+]
|
gen
`LINE'=`QUANT'[1] + `CNT'* /*
*/ ((`QUANT'[`CNT'[_N]]-`QUANT'[1])/`CNT'[_N])
|
|
base/q/quantile_7.ado:
|
11 [+]
|
gen
`LINE'=`QUANT'[1] + `CNT'* /*
*/ ((`QUANT'[`CNT'[_N]]-`QUANT'[1])/`CNT'[_N])
|
|
base/r/regre_p2.ado:
|
126 [+]
|
replace
`Y' = `p'*`E' + (1-`p')*`lb' /*
*/
if `touse' & `lb'!=. & `ub'==.
|
|
:
|
128 [+]
|
replace
`Y' = `p'*`E' + (1-`p')*`ub' /*
*/
if `touse' & `lb'==. & `ub'!=.
|
|
:
|
130 [+]
|
replace
`Y' = `p'*`E' + `p2'*`lb' + (1-`p'-`p2')*`ub' /*
*/
if `touse' & `lb'!=. & `ub'!=.
|
|
base/r/regres_p.ado:
|
250 [+]
|
gen
`type' `newvar'=`RSTU'*`RES'/sqrt((1-`HAT')*`SRES'[_N])
|
|
base/r/rocreg_p.ado:
|
407 [+]
|
qui
replace
`intercept_`varit'' = ///
`bmat'[1,`icr']*`ivar'+
|
|
base/r/rocregstat.ado:
|
342 [+]
|
qui
gen
double `roc_`vvit''= ///
`eb'[1,`ic'] + ///
`eb'[1,`sc']*`lirc'
|
|
base/r/roctab.ado:
|
615 [+]
|
by `touse' `C':
gen
`row1' = sum(`touse'*(1-`D')*`wv')
|
|
:
|
628 [+]
|
gen
`row6' = `row3'*(`row4'*(`row4'+`row1')+(1/3)*`row1'^2)
if `touse'
|
|
:
|
631 [+]
|
gen
`row7' = `row1'*(`row2'*(`row2'+`row3')+(1/3)*`row3'^2)
if `touse'
|
|
base/r/roctab_7.ado:
|
499 [+]
|
by `touse' `C':
gen
`row1' = sum(`touse'*(1-`D')*`wv')
|
|
:
|
512 [+]
|
gen
`row6' = `row3'*(`row4'*(`row4'+`row1')+(1/3)*`row1'^2)
if `touse'
|
|
:
|
515 [+]
|
gen
`row7' = `row1'*(`row2'*(`row2'+`row3')+(1/3)*`row3'^2)
if `touse'
|
|
base/r/rologit_p.ado:
|
94 [+]
|
gen
`vtyp' `varn' = `p'*(1-`p')*`b'
if `touse'
|
|
base/r/rreg.ado:
|
182 [+]
|
replace
`y'= `y' + /*
*/ (`lambda'*`scale'/`aa')*(`res'/`scale')*`weight' /*
*/
if `touse'
|
|
base/s/sample.ado:
|
89 [+]
|
by `by':
replace
`N'=int(`N'[_N]*`exp'/100+.5)
|
|
base/s/sem.ado:
|
81 [+]
|
capture
drop
`SEM'*
All properties
| key |
content |
| command |
drop |
| indent |
2 |
| parameters |
`SEM'* |
| prefix |
capture |
|
|
base/s/slogit_d2.ado:
|
31 [+]
|
replace
`p`i'' = `p`i'' - el(`phi`dm'',1,`i')*`xb`dm''
|
|
base/s/stmh.ado:
|
193 [+]
|
by `str' `by':
gen
double `d1' = /*
*/ sum(`wt'*_d *`e')
|
|
:
|
204 [+]
|
gen
double `d1' = sum(`wt'*_d *`e')
|
|
base/s/stphtest.ado:
|
229 [+]
|
gen
double `wrk' = sum(cond(e(sample), /*
*/ (`rnk'-`rvar')*``i'', 0))
|
|
:
|
265 [+]
|
gen
double `gnum' = sum(cond(e(sample), /*
*/ (`rnk'-`rvar')*``i'',0))
|
|
base/s/stphtest_7.ado:
|
205 [+]
|
gen
double `wrk' = sum(cond(e(sample), /*
*/ (`rnk'-`rvar')*``i'', 0))
|
|
:
|
241 [+]
|
gen
double `gnum' = sum(cond(e(sample), /*
*/ (`rnk'-`rvar')*``i'',0))
|
|
base/s/suest.ado:
|
184 [+]
|
capture
predict
double `sci'*
if `esamp'
, score
|
|
base/s/svygen.ado:
|
78 [+]
|
quietly by `by' :
replace
`wgt' = (_n==1)*`postwt'
|
|
base/s/svytab.ado:
|
771 [+]
|
gen
double `x' = ($S_VYexp)*`y'
|
|
:
|
1438 [+]
|
gen
double `xc' = e(total)*`bij'
in 1/`ncat'
|
|
:
|
1441 [+]
|
replace
`xc' = e(total)*`matr'[1,_n-`Nr1'+1] /*
*/
in `Nr1'/`Nr2'
|
|
:
|
1443 [+]
|
replace
`xc' = e(total)*`matc'[1,_n-`Nc1'+1] /*
*/
in `Nc1'/`Nc2'
|
|
:
|
1527 [+]
|
replace
`xse' = `porp'* /*
*/ sqrt(`V'[_n-`Nr1'+1, /*
*/ _n-`Nr1'+1])
in `Nr1'/`Nr2'
|
|
:
|
1533 [+]
|
replace
`xse' = `porp'* /*
*/ sqrt(`V'[_n-`Nc1'+1, /*
*/ _n-`Nc1'+1])
in `Nc1'/`Nc2'
|
|
base/s/svytab_7.ado:
|
759 [+]
|
gen
double `x' = ($S_VYexp)*`y'
|
|
:
|
1349 [+]
|
gen
double `xc' = e(total)*`bij'
in 1/`ncat'
|
|
:
|
1352 [+]
|
replace
`xc' = e(total)*`matr'[1,_n-`Nr1'+1] /*
*/
in `Nr1'/`Nr2'
|
|
:
|
1354 [+]
|
replace
`xc' = e(total)*`matc'[1,_n-`Nc1'+1] /*
*/
in `Nc1'/`Nc2'
|
|
:
|
1436 [+]
|
replace
`xse' = `porp'* /*
*/ sqrt(`V'[_n-`Nr1'+1, /*
*/ _n-`Nr1'+1])
in `Nr1'/`Nr2'
|
|
:
|
1442 [+]
|
replace
`xse' = `porp'* /*
*/ sqrt(`V'[_n-`Nc1'+1, /*
*/ _n-`Nc1'+1])
in `Nc1'/`Nc2'
|
|
base/t/tnbreg.ado:
|
650 [+]
|
qui
replace
`z' = lngamma(`y'+exp(`z')) - lngamma(`y'+1) /*
*/ - lngamma(exp(`z')) + `lndelta'*`y' - (`y'+exp(`z'))*`lnoned' /*
*/ - ln(nbinomialtail(exp(`z'),$ztnb_tp+1,(1+exp(`mudelta')) )) `if'
|
|
base/t/tnbreg_cons.ado:
|
114 [+]
|
qui
gen
double `f2' = `y' -(`y'+`m')*`delta'/
All properties
| key |
content |
| command |
gen |
| comment |
///
(1+`delta') - `z2' if $ML_samp |
| indent |
2 |
| parameters |
double `f2' = `y' -(`y'+`m')*`delta'/ |
| prefix |
qui |
|
|
base/t/tnbreg_mean.ado:
|
160 [+]
|
qui
gen
double `z3' = cond($ML_samp & `tp'==0, ///
-`p'^(`m'+1)*`mu'/ `z2', ///
cond($ML_samp & `tp'>0, ///
-(`x3'-`x2')/(2*`h2'), .))
-
qui gen double `z3' = cond($ML_samp & `tp'==0, ///
-`p'^(`m'+1)*`mu'/ `z2', ///
cond($ML_samp & `tp'>0, ///
-(`x3'-`x2')/(2*`h2'), .))
|
|
base/t/treatr_p.ado:
|
157 [+]
|
gen
`vtyp' `varn' = `Xb'- `trtname'*[`depname']_b[`trtname'] /*
*/ + [`depname']_b[`trtname'] + (normd(`Xbprb') / /*
*/ normprob(`Xbprb')) * `sigma' * `rho'
|
|
:
|
166 [+]
|
gen
`vtyp' `varn' = `Xb'- `trtname'*[`depname']_b[`trtname'] /*
*/ - (normd(`Xbprb')/normprob(-`Xbprb')) /*
*/ * `sigma' * `rho'
|
|
base/t/trnb_cons.ado:
|
48 [+]
|
qui
replace
`g1' = `z2'-(1+`delta')^(-`m')*`lnoned'*`m' /*
*/ / `z3'
if $ML_samp
|
|
:
|
51 [+]
|
qui
replace
`g2' = `y' -(`y'+`m')*`delta'/(1+`delta') - `z2' /*
*/ + (1+ `delta')^(-`m')*(`m'*ln(1+`delta') /*
*/ -`mu'/(1+`delta') )/ `z3'
if $ML_samp
|
|
base/t/trnb_mean.ado:
|
45 [+]
|
replace
`sc1' = `p'*(`y'-`mu') - /*
*/ `p'^(`m'+1)*`mu'/ `z2'
if $ML_samp
|
|
base/u/u_mi_impute_fv2var.ado:
|
11 [+]
|
cap
drop
`fvstub'*
All properties
| key |
content |
| command |
drop |
| indent |
2 |
| parameters |
`fvstub'* |
| prefix |
cap |
|
|
base/w/weib1_lf.ado:
|
38 [+]
|
replace
`g2' = /*
*/ `p'*(((`xb'-`lnt')*`eplnt' - (`xb'-`lnt0')*`eplnt0') /*
*/ + `d'*((`lnt'-`xb' + 1/`p')))
|
|
base/w/weibhet_glfa.ado:
|
25 [+]
|
gen
double `b' = exp(-`beta'*`p')*`t'^`p'
if $ML_samp
|
|
:
|
26 [+]
|
gen
double `b0' = cond(`t0'>0, exp(-`beta'*`p')*`t0'^`p',0) /*
*/
if $ML_samp
|
|
base/w/weibhet_gp.ado:
|
180 [+]
|
qui
gen
double `kk' = exp(`xb')*`t'^(`auxp'-1) /*
*/
if `touse'
|
|
:
|
195 [+]
|
qui
gen
double `ff'= 1+`theta'*exp(`xb')*`t'^`auxp' /*
*/
if `touse'
|
|
:
|
197 [+]
|
qui
gen
double `ff0'= 1+`theta'*exp(`xb')*`t0'^`auxp' /*
*/
if `t0'>0 & `touse'
|
|
:
|
226 [+]
|
qui
gen
double `ff'= /*
*/ (`d'!=0)-(1/`theta')* /*
*/ ln(1+`theta'*exp(`xb')*`t'^`auxp')
if `touse'
|
|
:
|
229 [+]
|
qui
replace
/*
*/ `ff'=`ff'+(1/`theta')* /*
*/ ln(1+`theta'*exp(`xb')*`t0'^`auxp') /*
*/
if `t0'>0 & `touse'
|
|
base/w/weibhet_ilf.ado:
|
26 [+]
|
gen
double `b' = exp(`beta')*`t'^`p'
if $ML_samp
|
|
:
|
27 [+]
|
gen
double `b0' = cond(`t0'>0, exp(`beta')*`t0'^`p',0) /*
*/
if $ML_samp
|
|
:
|
41 [+]
|
replace
`g1' = -`f' + `f0' + `d'* /*
*/ (1 - `th'*`f'/`c')
All properties
| key |
content |
| command |
replace |
| indent |
2 |
| parameters |
`g1' = -`f' + `f0' + `d'* /*
*/ (1 - `th'*`f'/`c') |
|
|
:
|
43 [+]
|
replace
`g2' = (-`f'*`lnt' + `f0'*`lnt0' + `d'*`lnt'* /*
*/ (1-`th'*`f'/`c'))*`p' + `d'
|
|
base/w/weibhet_ilf_sh.ado:
|
128 [+]
|
replace
`dz' = cond(`sumd'!=., /*
*/ -(1/`c' - 1)*`ith'^2 + /*
*/ `c'*`sums'*(`a'*`sums' - `ith') , 0) /*
*/
if $ML_samp
|
|
base/w/weibhet_ilfa_sh.ado:
|
136 [+]
|
replace
`dz' = cond(`sumd'!=., /*
*/ -(1/`c' - 1)*`ith'^2 + /*
*/ `c'*`sums'*(`a'*`sums' - `ith') , 0) /*
*/
if $ML_samp
|
|
base/w/weibhet_ip.ado:
|
183 [+]
|
qui
gen
double `kk' = exp(`xb')*`t'^(`auxp'-1)
if `touse'
|
|
:
|
197 [+]
|
qui
gen
double `ff'= 1+2*`theta'*exp(`xb')*`t'^`auxp' /*
*/
if `touse'
|
|
:
|
199 [+]
|
qui
gen
double `ff0'= 1+2*`theta'*exp(`xb')*`t0'^`auxp' /*
*/
if `t0'>0 & `touse'
|
|
:
|
228 [+]
|
qui
gen
double `ff'= /*
*/ (`d'!=0)+(1/`theta')* /*
*/ (1-sqrt(1+2*`theta'*exp(`xb')*`t'^`auxp'))
if `touse'
|
|
:
|
231 [+]
|
qui
replace
/*
*/ `ff'=`ff'-(1/`theta')* /*
*/ (1-sqrt(1+2*`theta'*exp(`xb')*`t0'^`auxp')) /*
*/
if `t0'>0 & `touse'
|
|
base/w/weibul_p.ado:
|
237 [+]
|
gen
`vtyp' `varn' = /*
*/ exp( -exp(`rgn'*`xb')* `t'^`aux_p' ) / /*
*/ exp( -exp(`rgn'*`xb')*`t0'^`aux_p' )
if `touse'
|
|
base/w/wntestb_7.ado:
|
297 [+]
|
gen
int `mapy' = ($S_GPH_ay)*`y' + ($S_GPH_by)
|
|
:
|
298 [+]
|
gen
int `mapx' = ($S_GPH_ax)*`x' + ($S_GPH_bx)
|
|
:
|
315 [+]
|
gen
int `mapy1'=($S_GPH_ay)*`inarg' + ($S_GPH_by)
|
|
:
|
317 [+]
|
gen
int `mapx1'=($S_GPH_ax)*`inarg' + ($S_GPH_bx)
|
|
:
|
333 [+]
|
replace
`mapy2'=($S_GPH_ay)*`inarg' + ($S_GPH_by)
|
|
:
|
336 [+]
|
replace
`mapx2'=($S_GPH_ax)*`inarg' + ($S_GPH_bx)
|
|
:
|
396 [+]
|
gen
int `mapy' = ($S_GPH_ay)*`y' + ($S_GPH_by)
|
|
:
|
397 [+]
|
gen
int `mapx' = ($S_GPH_ax)*`x' + ($S_GPH_bx)
|
|
:
|
489 [+]
|
gen
int `mapy' = ($S_GPH_ay)*`y' + ($S_GPH_by)
|
|
:
|
490 [+]
|
gen
int `mapx' = ($S_GPH_ax)*`x' + ($S_GPH_bx)
|
|
base/x/xi.ado:
|
423 [+]
|
label
var `stub'`num1' "(`lbl1')*`part2'"
|
|
base/x/xi_6.ado:
|
215 [+]
|
label
var `stub'`num1' "(`lbl1')*`part2'"
|
|
base/x/xtcloglog.ado:
|
420 [+]
|
gen
double `logFc' = log((`sn'==1) -`sn'* exp(-exp(`xb')))
if `touse'
|
|
base/x/xtgee.ado:
|
1564 [+]
|
replace
`dj' = 2*(`y'*ln(`y'/`mu')-(1+`k'*`y')/`k'* /*
*/ ln((1+`k'*`y')/(1+`k'*`mu')))
if `y'
|
|
:
|
1666 [+]
|
replace
`dj' = 2*(`y'*ln(`y'/`mu')-(1+`k'*`y')/`k'* /*
*/ ln((1+`k'*`y')/(1+`k'*`mu')))
if `y'
|
|
base/x/xtgee_p.ado:
|
229 [+]
|
qui
replace
`xb' = (`e(power)'*`xb'+1)^(1/`e(power)') /*
*/
if `touse'
|
|
base/x/xtgee_plink.ado:
|
42 [+]
|
replace
`m' = (`m'/`N'*.9999)*`N'
All properties
| key |
content |
| command |
replace |
| indent |
3 |
| parameters |
`m' = (`m'/`N'*.9999)*`N' |
|
|
base/x/xtgls.ado:
|
681 [+]
|
gen
double ${X_ee}`i' = $X_ee[`b0'+_n]
in 1/$X_nt
|
|
base/x/xtregar.ado:
|
308 [+]
|
qui by `id':
gen
`tvar'=(sqrt(1-`rho'^2))*`x'
if _n==1
|
|
:
|
554 [+]
|
replace
`g_i'=sqrt(1-`rho'^2)*`g_i'
|
|
:
|
1143 [+]
|
by `id':
gen
double `zresLD'=(`zres'-`zres'[_n-1]*`Itj')^2
|
|
base/x/xtsf_ll.ado:
|
76 [+]
|
gen
double `denom' = sqrt(`gamma'*(1-`gamma')*`sigmaS2' /*
*/ *(1+(`eta2'-1)*`gamma'))
if $ML_samp
|
|
:
|
83 [+]
|
gen
double `f' = -1/2*`T'*(ln(2*_pi)+ln(`sigmaS2')) /*
*/ - 1/2*(`T'-1)*ln(1-`gamma') /*
*/ - 1/2*ln(1+(`eta2'-1)*`gamma') /*
*/ - ln(normprob(`z')) - 1/2*`z'^2 /*
*/ + ln(normprob(`zi')) /*
*/ + 1/2*`zi'^2 /*
*/ - 1/2*(`e2'/((1-`gamma')*`sigmaS2'))
|
|
:
|
143 [+]
|
gen
double `dne' = /*
*/ `sigmaS2'*(`gamma'-`gamma'^2)*`gamma'*`deta2'
|
|
:
|
151 [+]
|
gen
double `dzgamma' = -(`mu'+$S_COST*`eta_e')/`denom' /*
*/ - 0.5*(`mu'*(1-`gamma')-$S_COST*`gamma'*`eta_e') /*
*/ *`dng'/(`denom'^3)
|
|
:
|
157 [+]
|
gen
double `dzeta' = -$S_COST*`gamma'*`deta_e'/`denom' /*
*/ - (`mu'*(1-`gamma')-$S_COST*`gamma'*`eta_e')*0.5 /*
*/ *`dne'/`denom'^3
|
|
base/x/xtsf_llti.ado:
|
71 [+]
|
gen
double `denom' = sqrt(`gamma'*(1-`gamma')*`sigmaS2' /*
*/ *(1+(`eta2'-1)*`gamma'))
if $ML_samp
|
|
:
|
78 [+]
|
gen
double `f' = -1/2*`T'*(ln(2*_pi)+ln(`sigmaS2')) /*
*/ - 1/2*(`T'-1)*ln(1-`gamma') /*
*/ - 1/2*ln(1+(`eta2'-1)*`gamma') /*
*/ - ln(normprob(`z')) - 1/2*`z'^2 /*
*/ + ln(normprob(`zi')) /*
*/ + 1/2*`zi'^2 /*
*/ - 1/2*(`e2'/((1-`gamma')*`sigmaS2'))
if $ML_samp
|
|
:
|
131 [+]
|
gen
double `dzgamma' = -(`mu'+$S_COST*`eta_e')/`denom' /*
*/ - 0.5*(`mu'*(1-`gamma')-$S_COST*`gamma'*`eta_e') /*
*/ *`dng'/(`denom'^3)
|
|
base/z/zinb_llf.ado:
|
39 [+]
|
qui
gen
double `fz' = exp(`zg')*`f1'*`f1'
if $ML_samp
|
|
:
|
71 [+]
|
qui
replace
`ttt' = cond(`y' == 0,
(-`f1'*`mu'*`p'^(`m'+1)*
(`alpha'*`mu'*(`m'+1)*`p'-1))/`f2' +
`sc1'*`sc1',
`alpha'*`mu'*`p'^2*(`y'-`mu')+`mu'*`p' )
if $ML_samp
|
|
:
|
84 [+]
|
qui
replace
`ttt' = cond(`y' == 0,
(-`f1'*`mu'*`p'^(`m'+1)*((`m'+1)*`mu'*`p'+
`m'*`m'*ln(`p')))/`f2' +
`f1'*`f1'*`mu'*`p'^(2*`m'+1)*(`m'*`mu'*`p'+
`m'*`m'*ln(`p'))/(`f2'*`f2'),
`mu'*`p'^2*(`y'-`mu') )
if $ML_samp
-
qui replace `ttt' = cond(`y' == 0,
(-`f1'*`mu'*`p'^(`m'+1)*((`m'+1)*`mu'*`p'+
`m'*`m'*ln(`p')))/`f2' +
`f1'*`f1'*`mu'*`p'^(2*`m'+1)*(`m'*`mu'*`p'+
`m'*`m'*ln(`p'))/(`f2'*`f2'),
`mu'*`p'^2*(`y'-`mu') ) if $ML_samp
|
|
:
|
93 [+]
|
qui
replace
`ttt' = cond(`y' == 0 ,
-(1-exp(`zg'))*`f1'*`fz'*(1-`p'^`m') / `f2' +
(`fz'*(1-`p'^`m') / `f2')^2 ,
(1-exp(`zg'))*`f1'*`fz'/`f1' + (`fz'/`f1')^2)
if $ML_samp
|
|
:
|
99 [+]
|
qui
replace
`ttt' = cond(`y' == 0,
-`fz'/`f2'*(1+(1-`p'^`m')*`f1'/`f2')*
`p'^`m'*(`m'*`m'*ln(`p')+`m'*`mu'*`p'),
0 )
if $ML_samp
|
|
base/z/zinb_plf.ado:
|
70 [+]
|
qui
replace
`ttt' = cond(`y' == 0,
(-`f1'*`mu'*`p'^(`m'+1)*
(`alpha'*`mu'*(`m'+1)*`p'-1))/`f2' +
`sc1'*`sc1',
`alpha'*`mu'*`p'^2*(`y'-`mu')+`mu'*`p' )
if $ML_samp
|
|
:
|
77 [+]
|
qui
replace
`ttt' = cond(`y' == 0,
-normd(`zg')*`mu'*`p'^(`m'+1) / `f2' -
`f1'*`mu'*`p'^(`m'+1)*normd(`zg')*(1-`p'^`m') / (`f2'*`f2') ,
0 )
if $ML_samp
|
|
:
|
83 [+]
|
qui
replace
`ttt' = cond(`y' == 0,
(-`f1'*`mu'*`p'^(`m'+1)*((`m'+1)*`mu'*`p'+
`m'*`m'*ln(`p')))/`f2' +
`f1'*`f1'*`mu'*`p'^(2*`m'+1)*(`m'*`mu'*`p'+
`m'*`m'*ln(`p'))/(`f2'*`f2'),
`mu'*`p'^2*(`y'-`mu') )
if $ML_samp
-
qui replace `ttt' = cond(`y' == 0,
(-`f1'*`mu'*`p'^(`m'+1)*((`m'+1)*`mu'*`p'+
`m'*`m'*ln(`p')))/`f2' +
`f1'*`f1'*`mu'*`p'^(2*`m'+1)*(`m'*`mu'*`p'+
`m'*`m'*ln(`p'))/(`f2'*`f2'),
`mu'*`p'^2*(`y'-`mu') ) if $ML_samp
|
|
:
|
98 [+]
|
qui
replace
`ttt' = cond(`y' == 0,
-normd(`zg')/`f2'*(1+(1-`p'^`m')*`f1'/`f2')*
`p'^`m'*(`m'*`m'*ln(`p')+`m'*`mu'*`p'),
0 )
if $ML_samp
|
|
base/z/zip.ado:
|
375 [+]
|
replace
`prhat'=(1-`psihat')*(exp(-1*`muhat') /*
*/ *`muhat'^`dep')/exp(lnfact(`dep')) /*
*/
if `dep'>0 & `dep'<. & `touse'
|
|
base/z/zip_llf.ado:
|
27 [+]
|
qui
gen
double `fz' = exp(`zg')*`f1'*`f1'
if $ML_samp
|
|
:
|
58 [+]
|
qui
replace
`ttt' = cond($ML_y1 == 0,
-`fz'*`lambda'*exp(-`lambda') / `f2' -
`fz'*(1-exp(-`lambda'))*`f1'*
`lambda'*exp(-`lambda') / `f2'^2,
0)
if $ML_samp
|
|
:
|
66 [+]
|
qui
replace
`ttt' = cond($ML_y1 == 0 ,
-(1-exp(`zg'))*`f1'*`fz'*(1-exp(-`lambda')) / `f2' +
(`fz'*(1-exp(-`lambda')) / `f2')^2 ,
(1-exp(`zg'))*`f1'*`fz'/`f1' + (`fz'/`f1')^2)
if $ML_samp
|
|
base/z/zip_plf.ado:
|
58 [+]
|
qui
replace
`ttt' = cond($ML_y1 == 0,
-normd(`zg')*`lambda'*exp(-`lambda') / `f2' -
normd(`zg')*(1-exp(-`lambda'))*`f1'*
`lambda'*exp(-`lambda') / `f2'^2,
0)
if $ML_samp
|
|
base/z/ztnb.ado:
|
501 [+]
|
qui
replace
`z' = lngamma(`y'+exp(`z')) - lngamma(`y'+1) /*
*/ - lngamma(exp(`z')) + `lndelta'*`y' - (`y'+exp(`z'))*`lnoned' /*
*/ - ln(1-(1+exp(-`lndelta'*`mudelta'))) `if'
|
-
-
Script Output
open: Opening price Number of Observations
-------------------- ------------------------------
Total Integers Nonintegers
| # Negative - - -
| # # Zero - - -
| # # Positive 248 - 248
| # # ----- ----- -----
| # # # # Total 248 - 248
| . # # # # Missing -
+---------------------- -----
965.8 1373.73 248
(More than 99 unique values)
Variable | Obs Mean Std. Dev. Min Max
-------------+--------------------------------------------------------
open | 248 1194.884 87.12808 965.8 1373.73
@mean 1194.884
@sd 87.128
@min 965.800
@max 1373.730
@example0 1320.28
@histh .00029654, .00074135, .00059308, .0014827, .00222405, .00237232, .005486, .0040033, .00341022, .0040033, .00415157, .00266886, .00177924, .00163097, .00192751
@histw 979.39764, 1006.593, 1033.7883, 1060.9836, 1088.179, 1115.3743, 1142.5697, 1169.765, 1196.9603, 1224.1556, 1251.351, 1278.5463, 1305.7417, 1332.937, 1360.1323
@type float
@label Opening price
@class other
@N_unique .
@N 248
|
[+]
volume
@sp500.dta |
|
other
(double)
|
248
(.)
|
(x̄=12320.677, 2585.929) [4103.000,23308.300] |
Volume (thousands)
|
All properties
| key |
content |
| N |
248 |
| N_unique |
. |
| class |
other |
| example0 |
11294 |
| histh |
6.299e-06, 3.149e-06, 6.299e-06, .00004409, .00009448, .00019526, .00016377, .00016062, .00004724, .0000189, .00001575, 9.448e-06, 3.149e-06, 6.299e-06, 6.299e-06 |
| histw |
4743.1768, 6023.5298, 7303.8833, 8584.2363, 9864.5898, 11144.943, 12425.297, 13705.65, 14986.003, 16266.356, 17546.711, 18827.063, 20107.416, 21387.77, 22668.123 |
| label |
Volume (thousands) |
| max |
23308.300 |
| mean |
12320.677 |
| min |
4103.000 |
| sd |
2585.929 |
| type |
double |
Data Manipulations with volume
| file |
# |
command |
|
base/a/arch.ado:
|
552 [+]
|
qui
gen
double `wt_e2' = .7^(`timevar'-r(tmin))*$Te2 /*
*/
if `touse'
|
|
:
|
1131 [+]
|
qui
gen
double $Te_tarch = ($Te > 0)*$Te2
|
|
base/a/arch_dr.ado:
|
86 [+]
|
qui
gen
double `wt_e2' = /*
*/ .7^($Ttimevar-$Ttimemin)*$Te2 /*
*/
if $ML_samp
|
|
:
|
208 [+]
|
qui
gen
double `wt_e2' = /*
*/ .7^($Ttimevar-$Ttimemin)*$Te2
if $ML_samp
|
|
base/b/boxcox_p.ado:
|
80 [+]
|
gen
`vtyp' `varn' = (e(L)*`xb'+1)^(1/e(L)) /*
*/
if `touse'
|
|
base/b/bsample.ado:
|
168 [+]
|
gen
`r' = int(uniform()*`nmax' + 1)
|
|
:
|
357 [+]
|
gen
double `r' = int(uniform()*`nclust' + 1)
in 1/`nclust'
|
|
:
|
539 [+]
|
by `strata' `clid' `obsid':
replace
`r' = (`clid'-1)*`nclust'+_n-1
|
|
:
|
574 [+]
|
by `strata' `clid' `obsid':
replace
`r' = (`clid'-1)*`nclust'+_n-1
|
|
base/b/bsample_7.ado:
|
99 [+]
|
gen
double `r' = int(uniform()*`nclust' + 1)
in 1/`nclust'
|
|
:
|
115 [+]
|
by `clid' `obsid':
replace
`r' = (`clid'-1)*`nclust'+_n-1
|
|
base/c/clogit.ado:
|
654 [+]
|
qui by `touse' `group':
gen
double `i' = (_n==1&`touse')*`freq'
|
|
base/c/cluster.ado:
|
2291 [+]
|
qui by `tousevar' :
gen
long `grpvar' = /*
*/ int(((_n-1)/_N)*`k') + 1
if `tousevar'
|
|
:
|
2391 [+]
|
qui
replace
`var'=uniform()*`vrange'+`vmin' /*
*/
in `Np1'/`newN'
|
|
base/c/cluster_tree_8.ado:
|
905 [+]
|
qui
gen
double `cind' = `lbuf' + (`ncols'-`rbuf'-`lbuf')*`atx'/`maxx' /*
*/
if `atx' < .
|
|
base/c/cusum.ado:
|
44 [+]
|
replace
`x' = `x'+uniform()*`jx'
-
/*
To avoid ties and ensure a unique sort order for x,
randomly jitter x by .00001 times its range using a fixed seed
Answer: No, setting the seed screws up Monte Carlo experiments.
*/
replace `x' = `x'+uniform()*`jx'
|
|
base/c/cusum_7.ado:
|
27 [+]
|
replace
`x' = `x'+uniform()*`jx'
-
/*
To avoid ties and ensure a unique sort order for x,
randomly jitter x by .00001 times its range using a fixed seed
Answer: No, setting the seed screws up Monte Carlo experiments.
*/
replace `x' = `x'+uniform()*`jx'
|
|
base/d/dfgls.ado:
|
126 [+]
|
gen
double `dty'=`varlist'-_b[`iota']-_b[`qdtrd']*`trd'
|
|
base/d/dvech_p.ado:
|
700 [+]
|
qui
predict
double `res'*
if `touse'
, residuals
|
|
base/e/ereg.ado:
|
172 [+]
|
gen
double `lnf' = `wv' * ///
(`d'*`cons'-exp(`cons')*`realt')
|
|
base/e/ereg_lf.ado:
|
13 [+]
|
quietly
replace
`g1' = $ML_y2-exp(`I')*$ML_y1
|
|
base/e/ereg_p.ado:
|
348 [+]
|
gen
`typlist' `varlist' = `minus'(`d'-exp(`minus'`I')*`t')
if `touse'
|
|
base/e/ereghet_glf.ado:
|
22 [+]
|
gen
double `b' = exp(`beta')*`t'
if $ML_samp
|
|
:
|
23 [+]
|
gen
double `b0' = cond(`t0'>0, exp(`beta')*`t0',0) /*
*/
if $ML_samp
|
|
base/e/ereghet_gp.ado:
|
206 [+]
|
qui
gen
double `ff'= 1+`theta'*exp(`xb')*`t'
if `touse'
|
|
:
|
207 [+]
|
qui
gen
double `ff0'= 1+`theta'*exp(`xb')*`t0' /*
*/
if `t0'>0 & `touse'
|
|
:
|
236 [+]
|
qui
gen
double `ff'= /*
*/ (`d'!=0)-(1/`theta')* /*
*/ ln(1+`theta'*exp(`xb')*`t')
if `touse'
|
|
:
|
239 [+]
|
qui
replace
/*
*/ `ff'=`ff'+(1/`theta')* /*
*/ ln(1+`theta'*exp(`xb')*`t0') /*
*/
if `t0'>0 & `touse'
|
|
base/e/ereghet_ilf.ado:
|
21 [+]
|
gen
double `b' = exp(`beta')*`t'
if $ML_samp
|
|
:
|
22 [+]
|
gen
double `b0' = cond(`t0'>0, exp(`beta')*`t0',0) /*
*/
if $ML_samp
|
|
:
|
53 [+]
|
gen
double `dt' = `th'*(`f'*`f'/`c' - cond(`t0'>0, /*
*/ `f0'*`f0'/`c0',0) - `d'*`f'/`c'* /*
*/ (1-2*`th'*`f'/`c'))
|
|
base/e/ereghet_ilf_sh.ado:
|
97 [+]
|
replace
`dz' = cond(`sumd'<., /*
*/ -(1/`c' - 1)*`ith'^2 + /*
*/ `c'*`sums'*(`a'*`sums' - `ith') , 0) /*
*/
if $ML_samp
|
|
base/e/ereghet_ip.ado:
|
206 [+]
|
qui
gen
double `ff'= 1+2*`theta'*exp(`xb')*`t'
if `touse'
|
|
:
|
207 [+]
|
qui
gen
double `ff0'= 1+2*`theta'*exp(`xb')*`t0' /*
*/
if `t0'>0 & `touse'
|
|
:
|
236 [+]
|
qui
gen
double `ff'= /*
*/ (`d'!=0)+(1/`theta')* /*
*/ (1-sqrt(1+2*`theta'*exp(`xb')*`t'))
if `touse'
|
|
:
|
239 [+]
|
qui
replace
/*
*/ `ff'=`ff'-(1/`theta')* /*
*/ (1-sqrt(1+2*`theta'*exp(`xb')*`t0')) /*
*/
if `t0'>0 & `touse'
|
|
base/e/etpoisson_p.ado:
|
111 [+]
|
gen
`typlist' `varlist' = ///
exp(((`sigma'^2)/2))* ///
(exp(`xb1')-exp(`xb0'))*`onswitch'
|
|
base/f/fpredict.ado:
|
106 [+]
|
quietly
gen
`type' `newvar'=`RSTU'*`RES'/sqrt((1-`HAT')*`SRES'[_N])
|
|
base/f/frac_mun.ado:
|
9 [+]
|
cap
drop
`name'*
All properties
| key |
content |
| command |
drop |
| indent |
2 |
| parameters |
`name'* |
| prefix |
cap |
|
|
base/f/fracpred.ado:
|
173 [+]
|
replace
`v' = `v'+((`j'<`i')+1)*`V'[`i',`j']*`xi'*`xj'
|
|
:
|
184 [+]
|
replace
`v'=`v'+2*`V'[`ncons',`i']*`xi'
|
|
:
|
201 [+]
|
replace
`v'=`v'+`xb'_b[`xi']*`xi'
|
|
base/f/fron_p.ado:
|
163 [+]
|
gen
`vtyp' `varn'=`mu1'+`sigma1'* /*
*/ (normd(-`z')/norm(`z')) /*
*/
if `cond'
|
|
base/f/fron_tn.ado:
|
45 [+]
|
qui
gen
double `w1' = (1-`gamma')*`zd' /*
*/ - $S_COST*`gamma'*(`ytilde'-`xb')
|
|
:
|
70 [+]
|
qui
gen
double `dditdg' = -.5*`zd'*(`gamma'^(-1.5))*`dgt'
|
|
:
|
81 [+]
|
qui
gen
double `gj2' = -(`ytilde'-`xb'+$S_COST*`zd')*$S_COST /*
*/ - `ratio1'/sqrt(`gamma') /*
*/ + `ratio2'*`dditsdzd'
|
|
:
|
90 [+]
|
qui
gen
double `dw1' = (-`zd'-$S_COST*(`ytilde'-`xb'))*`dgt'
|
|
:
|
122 [+]
|
qui
gen
double `d2w2' = `dw2'*(-0.5/`gamma'+0.5/(1-`gamma'))*`dgt' /*
*/ + `w2'*(0.5/(`gamma'^2)+0.5/(1-`gamma')^2)*`dgt'*`dgt' /*
*/ + `w2'*(-0.5/`gamma'+0.5/(1-`gamma'))*`d2gdg2'
|
|
base/g/gamhet_gp.ado:
|
144 [+]
|
gen
`vtyp' `varn'=exp(`sgn'sqrt(`ga')*`sigma'* /*
*/ ln(`cc'/`ga') + `xb')
if `touse'
|
|
:
|
165 [+]
|
gen
`vtyp' `varn'=(`sgn'sqrt(`ga')*`sigma'* /*
*/ ln(`cc'/`ga') + `xb')
if `touse'
|
|
:
|
203 [+]
|
qui
gen
double `ff'= exp(-`uu')*`uu'^(`ga'-1)* /*
*/ exp(-lngamma(`ga'))*`uu'/(sqrt(`ga')*`sigma'*`t') /*
*/
if `touse'
|
|
base/g/gamhet_ip.ado:
|
144 [+]
|
gen
`vtyp' `varn'=exp(`sgn'sqrt(`ga')*`sigma'* /*
*/ ln(`cc'/`ga') + `xb')
if `touse'
|
|
:
|
165 [+]
|
gen
`vtyp' `varn'=(`sgn'sqrt(`ga')*`sigma'* /*
*/ ln(`cc'/`ga') + `xb')
if `touse'
|
|
:
|
203 [+]
|
qui
gen
double `ff'= exp(-`uu')*`uu'^(`ga'-1)* /*
*/ exp(-lngamma(`ga'))*`uu'/(sqrt(`ga')*`sigma'*`t') /*
*/
if `touse'
|
|
base/g/gamma_d2.ado:
|
66 [+]
|
replace
`g1' = `dIdx'*`u'/ /*
*/ (sqrt(`l')*`sig'*`et')
if $ML_samp
|
|
:
|
74 [+]
|
replace
`g1' = `g1' - /*
*/ `dI0dx'*`u0'/ /*
*/ (sqrt(`l')*`sig'*`et0')
if $ML_samp & `t0'>0
|
|
:
|
80 [+]
|
replace
`g2' = `u'*`z'*sign(`k')* /*
*/ `dIdx' / /*
*/ (sqrt(`l')*`et')
if $ML_samp
|
|
:
|
84 [+]
|
replace
`g2' = `g2' - `d'* `g2'
All properties
| key |
content |
| command |
replace |
| indent |
2 |
| parameters |
`g2' = `g2' - `d'* `g2' |
|
|
:
|
86 [+]
|
replace
`g2' = `g2' + `d'*( /*
*/ (`z'* sqrt(`l'))*(`u'/`l' - 1) - 1)
if $ML_samp
|
|
:
|
89 [+]
|
replace
`g2' = `g2' - `u0'*`z0'*sign(`k')* /*
*/ `dI0dx'/ /*
*/ (sqrt(`l')*`et0')
if $ML_samp & `t0' > 0
|
|
:
|
95 [+]
|
replace
`g3' = (2.0*`l'*sqrt(`l')*`detl' - /*
*/ (`z' - 2.0*sqrt(`l'))* /*
*/ `dIdx'*`u')/`et'
if $ML_samp
|
|
:
|
101 [+]
|
replace
`g3' = `g3' + `d'* /*
*/ (-2.0*sign(`k')*`l'*sqrt(`l')* /*
*/ (ln(`l') +(`l' -0.5)/`l' - digamma(`l')) - /*
*/ sign(`k')*`z'*`l' - /*
*/ sign(`k')*`u'*(`z' - 2.0*sqrt(`l')))
if $ML_samp
|
|
:
|
107 [+]
|
replace
`g3' = `g3' - /*
*/ (2.0*`l'*sqrt(`l')*`det0l' - /*
*/ (`z0' - 2.0*sqrt(`l'))* /*
*/ `dI0dx'*`u0')/`et0'/*
*/
if $ML_samp & `t0'> 0
|
|
:
|
127 [+]
|
gen
double `d11' = (-`et'*`u'*sign(`k')*(`d2Idxdx'*`u' + /*
*/ `dIdx') - `u'^2*`dIdx'^2)/((`et'^2)*`l'*`sig'^2)
if $ML_samp
|
|
:
|
137 [+]
|
replace
`d11' = (1 - `d')*`d11'
if $ML_samp
|
|
:
|
141 [+]
|
replace
`d11' = `d11' - (-`et0'*`u0'*sign(`k')*(`d2I0dxdx' /*
*/ *`u0' + `dI0dx') - `u0'^2*`dI0dx'^2)/(`et0'^2*`l'*`sig'^2)/*
*/
if $ML_samp & `t0'>0
|
|
:
|
153 [+]
|
generate
double `d12' = -`u'*`z'*(`dIdx' +`u'*`d2Idxdx')/ /*
*/ (`et'*`l'*`sig') - `u'*`dIdx'*(`et'*sqrt(`l') + /*
*/ sign(`k')*`dIdx'*`u'*`z')/(`et'^2*`l'*`sig')
if $ML_samp
|
|
:
|
164 [+]
|
replace
`d12' = (1 - `d')*`d12'
if $ML_samp
|
|
:
|
169 [+]
|
replace
`d12' = `d12' +`u0'*`z0'*(`dI0dx' +`u0'*`d2I0dxdx')/ /*
*/ (`et0'*`l'*`sig') + `u0'*`dI0dx'*(`et0'*sqrt(`l') + /*
*/ sign(`k')*`dI0dx'*`u0'*`z0')/(`et0'^2*`l'*`sig') /*
*/
if $ML_samp & `t0'> 0
|
|
:
|
182 [+]
|
generate
double `d13' = `u'*sign(`k')* /*
*/ ((`z'-2*sqrt(`l'))*(`dIdx'/*
*/ + `u'*`d2Idxdx') - 2*`l'*sqrt(`l')*`d2Idadx')/ /*
*/ (`et'*sqrt(`l')*`sig') - `u'*`dIdx'*(2*`l'*sqrt(`l')* /*
*/ `detl' - sign(`k')*sqrt(`l')*`et' - /*
*/ `u'*(`z' - 2*sqrt(`l'))*`dIdx')/((`et'^2)*sqrt(`l')*`sig')/*
*/
if $ML_samp
|
|
:
|
209 [+]
|
replace
`d13' = (1 - `d')*`d13'
if $ML_samp
|
|
:
|
214 [+]
|
generate
double `d130' = /*
*/ `u0'*sign(`k')*((`z0'-2*sqrt(`l'))*(`dI0dx'/*
*/ + `u0'*`d2I0dxdx') - 2*`l'*sqrt(`l')*`d2I0dadx')/ /*
*/ (`et0'*sqrt(`l')*`sig') - `u0'*`dI0dx'*(2*`l'*sqrt(`l')* /*
*/ `det0l' - sign(`k')*sqrt(`l')*`et0' - /*
*/ `u0'*(`z0' - 2*sqrt(`l'))*`dI0dx')
|
|
:
|
245 [+]
|
generate
double `d22' = (-`et'*sign(`k')*`u'*`z' /*
*/ *(`d2Idxdx'*`u'*`z' + `z'*`dIdx' + sqrt(`l')*`dIdx') - /*
*/ (`u'*`z')^2*`dIdx'^2)/(`et'^2*`l')
if $ML_samp
|
|
:
|
257 [+]
|
replace
`d22' = (1-`d')*`d22'
if $ML_samp
|
|
:
|
262 [+]
|
replace
`d22' = `d22' - /*
*/ (-`et0'*sign(`k')*`u0'*`z0' /*
*/ *(`d2I0dxdx'*`u0'*`z0' + `z0'*`dI0dx' + /*
*/ sqrt(`l')*`dI0dx') - /*
*/ (`u0'*`z0')^2*`dI0dx'^2)/(`et0'^2*`l') /*
*/
if $ML_samp & `t0' > 0
|
|
:
|
278 [+]
|
generate
double `d23' = `u'*`z'*(`et'*sqrt(`l')*( /*
*/ (`z'-2*sqrt(`l'))*(`u'*`d2Idxdx' + `dIdx') - /*
*/ 2*`d2Idadx'*`l'*sqrt(`l')) - sign(`k')*`dIdx'*( /*
*/ -`dIdx'*sqrt(`l')*`u'*(`z' - 2*sqrt(`l')) + /*
*/ 2*`detl'*`l'^2 - `et'*sign(`k')*`l'))/(`et'^2*`l') /*
*/
if $ML_samp
|
|
:
|
296 [+]
|
replace
`d23' = (1-`d')*`d23'
if $ML_samp
|
|
:
|
298 [+]
|
replace
`d23' = `d23' + `d'* /*
*/ sign(`k')*(`z'*`u'+ `z'*`l' + /*
*/ `z'*`u'*(`z'- 2*sqrt(`l'))/sqrt(`l')) /*
*/
if $ML_samp
|
|
:
|
303 [+]
|
replace
`d23' = `d23' - /*
*/ `u0'*`z0'*(`et0'*sqrt(`l')*( /*
*/ (`z0'-2*sqrt(`l'))*(`u0'*`d2I0dxdx' + `dI0dx') - /*
*/ 2*`d2I0dadx'*`l'*sqrt(`l')) - sign(`k')*`dI0dx'*( /*
*/ -`dI0dx'*sqrt(`l')*`u0'*(`z0' - 2*sqrt(`l')) + /*
*/ 2*`det0l'*`l'^2 - `et0'*sign(`k')*`l'))/(`et0'^2*`l') /*
*/
if $ML_samp & `t0' > 0
|
|
:
|
326 [+]
|
generate
double `d33' = 2*sign(`k')*`l'^2*(-3*`detl' /*
*/ + `u'*(`z'-2*sqrt(`l'))*`d2Idadx'/sqrt(`l') /*
*/ - 2*`l'*`ddetl')/`et'
if $ML_samp
|
|
:
|
330 [+]
|
replace
`d33' = `d33' - 2*`l'*sqrt(`l')*`detl'*( /*
*/ -`u'*(`z' - 2*sqrt(`l'))*`dIdx' /*
*/ + 2*`l'*sqrt(`l')*`detl')/(`et'^2)
if $ML_samp
|
|
:
|
334 [+]
|
replace
`d33' = `d33' - sign(`k')*`u'*( /*
*/ ((`z'-2*sqrt(`l'))^2)*(`dIdx' + `u'*`d2Idxdx') /*
*/ + 2*`l'*`dIdx' /*
*/ - 2*`l'*sqrt(`l')*(`z'-2*sqrt(`l'))*`d2Idadx')/`et' /*
*/
if $ML_samp
|
|
:
|
340 [+]
|
replace
`d33' = `d33' + `u'*(`z'-2*sqrt(`l'))*`dIdx'* /*
*/ (-`u'*(`z'-2*sqrt(`l'))*`dIdx' /*
*/ + 2*`l'*sqrt(`l')*`detl')/(`et'^2)
if $ML_samp
|
|
:
|
345 [+]
|
replace
`d33' = (1-`d')*`d33'
if $ML_samp
|
|
:
|
355 [+]
|
replace
`d33' = `d33' - 2*sign(`k')*(`l'^2)*(-3*`det0l' /*
*/ + `u0'*(`z0'-2*sqrt(`l'))*`d2I0dadx'/sqrt(`l') /*
*/ - 2*`l'*`ddet0l')/`et0'
if $ML_samp & `t0'>0
|
|
:
|
359 [+]
|
replace
`d33' = `d33' + 2*`l'*sqrt(`l')*`det0l'*( /*
*/ -`u0'*(`z0' - 2*sqrt(`l'))*`dI0dx' /*
*/ + 2*`l'*sqrt(`l')*`det0l')/(`et0'^2)
if $ML_samp & `t0'>0
|
|
:
|
363 [+]
|
replace
`d33' = `d33' + sign(`k')*`u0'*( /*
*/ ((`z0'-2*sqrt(`l'))^2)*(`dI0dx' + `u0'*`d2I0dxdx') /*
*/ + 2*`l'*`dI0dx' /*
*/ - 2*`l'*sqrt(`l')*(`z0'-2*sqrt(`l'))*`d2I0dadx')/`et0' /*
*/
if $ML_samp & `t0'>0
|
|
:
|
369 [+]
|
replace
`d33' = `d33' - `u0'*(`z0'-2*sqrt(`l'))*`dI0dx'* /*
*/ (-`u0'*(`z0'-2*sqrt(`l'))*`dI0dx' /*
*/ + 2*`l'*sqrt(`l')*`det0l')/(`et0'^2)
if $ML_samp & `t0'>0
|
|
base/g/gamma_p.ado:
|
148 [+]
|
qui
replace
`varn'= `sgn'*log(`varn')*`sigma' /*
*/ +(abs(`kappa')*`xb')
|
|
:
|
234 [+]
|
qui
gen
double `ff'=((`l'-0.5)*ln(`l')) /*
*/ + (`z'*sqrt(`l'))-`l'*exp(`z'/sqrt(`l')) /*
*/ -lngamma(`l') - ln(`t'* `sigma')
if `touse'
|
|
base/g/glim_l01.ado:
|
19 [+]
|
gen
double `mu' = `eta'*$SGLM_m
|
|
base/g/glim_l04.ado:
|
20 [+]
|
gen
double `return' = `mu'*(1+`mu'*$SGLM_a)
|
|
:
|
24 [+]
|
gen
double `return' = `mu'*(1+`mu'*$SGLM_a)*(1+2*`mu'*$SGLM_a)
|
|
base/g/glim_l09.ado:
|
27 [+]
|
gen
double `return' = 2*`mu'*`mu'*`mu'/($SGLM_m*$SGLM_m)
|
|
base/g/glim_l11.ado:
|
23 [+]
|
gen
double `return' = `mu'^(1-$SGLM_p)*$SGLM_m^$SGLM_p/$SGLM_p
|
|
:
|
27 [+]
|
gen
double `return' = `mu'^(1-2*$SGLM_p)*(1/$SGLM_p)* /*
*/ (1/$SGLM_p-1)*$SGLM_m^$SGLM_p
|
|
base/g/glim_lf.ado:
|
33 [+]
|
qui
replace
`score' = ($ML_y1 - `mu')/(`phi'*`v')*`dmu'
if $ML_samp
|
|
base/g/glim_p.ado:
|
211 [+]
|
qui
gen
double `pt' = _b[`t']*`t'
|
|
base/g/glim_v6.ado:
|
31 [+]
|
gen
double `return' = `mu'+`mu'*`mu'*$SGLM_a
|
|
:
|
43 [+]
|
gen
double `return' = cond(`y'==0, /*
*/ 2*ln(1+`mu'*$SGLM_a)/$SGLM_a, /*
*/ 2*(`y'*ln(`y'/`mu') - /*
*/ (1+`y'*$SGLM_a)/$SGLM_a * /*
*/ ln((1+`y'*$SGLM_a)/(1+`mu'*$SGLM_a))))
|
|
:
|
90 [+]
|
gen
double `return' = (2 - `mu') / sqrt(`mu'+`mu'*`mu'*$SGLM_a)
|
|
base/g/glm.ado:
|
2140 [+]
|
qui
replace
`vt1' = `x'[_n-`j']*`res'*`res'[_n-`j']* /*
*/ `wv'[_n-`j']
if `touse'
|
|
base/g/glm_p.ado:
|
122 [+]
|
gen
double `V' = (`mu'+`e(k)'*`mu'^2)
if `touse'
|
|
base/g/glmpred.ado:
|
118 [+]
|
gen
double `V' = (`mu'+`e(k)'*`mu'^2)
|
|
base/g/gmm.ado:
|
1118 [+]
|
qui
replace
`normwt' = r(N)*`normwt'/r(sum)
|
|
base/g/gomp_lf.ado:
|
29 [+]
|
gen
double `et0' = exp(`g'*$EREGt0)
|
|
:
|
43 [+]
|
replace
`B' = `B' - (`L'/`g')*((`et'*`t')-(`et0'*$EREGt0))
|
|
base/g/gomper_p.ado:
|
128 [+]
|
gen
`vtyp' `varn'=(1/`gamma')* /*
*/ (ln(exp(`xb') + ln(2)*`gamma') - `xb')
if `touse'
|
|
base/g/gompertz.ado:
|
144 [+]
|
gen
double `den' = sum(`wvn'*(`t'-$EREGt0)*`touse')
|
|
base/g/gompertzhet.ado:
|
225 [+]
|
gen
double `den' = sum(`wvn'*(`t'-$EREGt0)*`touse')
|
|
base/g/gomphet_glf.ado:
|
81 [+]
|
replace
`c0' = cond(`t0'>0, /*
*/ (-`f0'+exp(`beta')*`th'*(`t0'*`t0'* /*
*/ exp(`ga'*`t0')- /*
*/ `t0'*exp(`ga'*`t0')/`ga' + (exp(`ga'*`t0')-1)/ /*
*/ (`ga'*`ga')))/`ga',0)
|
|
base/g/gomphet_glf_sh.ado:
|
31 [+]
|
gen
double `logs' = exp(`beta')/`gam'* /*
*/ (`expgt0' - `expgt')
if $ML_samp
|
|
base/g/gomphet_ilf.ado:
|
41 [+]
|
gen
double `f' = (2*`th'*exp(`beta')*`t'* /*
*/ exp(`ga'*`t')-`b')/`ga'
if $ML_samp
|
|
:
|
43 [+]
|
gen
double `f0' = cond(`t0'>0,(2*`th'*exp(`beta')*`t0'* /*
*/ exp(`ga'*`t0')-`b0')/`ga',0)
if $ML_samp
|
|
base/g/gomphet_ilf_sh.ado:
|
32 [+]
|
gen
double `logs' = exp(`beta')/`gam'* /*
*/ (`expgt0' - `expgt')
if $ML_samp
|
|
:
|
128 [+]
|
replace
`dz' = cond(`sumd'<., /*
*/ -(1/`c' - 1)*`ith'^2 + /*
*/ `c'*`sums'*(`a'*`sums' - `ith') , 0) /*
*/
if $ML_samp
|
|
base/g/gomphet_ip.ado:
|
175 [+]
|
qui
gen
double `ff'= `kk'/sqrt(1+2*`theta'/`gamma'* /*
*/ (`kk'-exp(`xb')))
if `touse'
|
|
base/g/gsem.ado:
|
31 [+]
|
capture
drop
`GSEM'*
All properties
| key |
content |
| command |
drop |
| indent |
1 |
| parameters |
`GSEM'* |
| prefix |
capture |
|
|
base/g/gsem_p.ado:
|
8 [+]
|
capture
drop
`tname'*
All properties
| key |
content |
| command |
drop |
| indent |
1 |
| parameters |
`tname'* |
| prefix |
capture |
|
|
base/g/gsem_parse.ado:
|
256 [+]
|
capture
drop
`GSEM'*
All properties
| key |
content |
| command |
drop |
| indent |
1 |
| parameters |
`GSEM'* |
| prefix |
capture |
|
|
base/h/hadimvo.ado:
|
144 [+]
|
replace
`D'=(`r'-1)*`D'/`cf'
All properties
| key |
content |
| command |
replace |
| indent |
2 |
| parameters |
`D'=(`r'-1)*`D'/`cf' |
|
|
:
|
169 [+]
|
replace
`D'=(`r'-1)*`D'/`cf'
All properties
| key |
content |
| command |
replace |
| indent |
3 |
| parameters |
`D'=(`r'-1)*`D'/`cf' |
|
|
base/h/heck_d2.ado:
|
34 [+]
|
qui
gen
double `eta' = (`Is' + /*
*/ ($ML_y1-`Ir')*`rho'/`sig') / sqrt(1-`rho'^2)
|
|
:
|
59 [+]
|
qui
replace
`sc3' = /*
*/ cond(`y2',`M'*(`ym'*`rr'+`eta'*`rho'*`rr'^2)*`dlr',0)
|
|
base/h/heckma_p.ado:
|
209 [+]
|
label
var `varn' "E(`depname'*|Pr(`selname'))"
|
|
base/h/hereg.ado:
|
123 [+]
|
gen
`score' = (`Fakedv'-`predz')*`hess'
|
|
base/i/ipolate.ado:
|
61 [+]
|
by `touse' `by':
replace
`z'=`m'[_N]*`x'+`b'[_N] /*
*/
if `touse' & `ismiss'
|
|
:
|
72 [+]
|
by `touse' `by':
replace
`z'=`M'[_N]*`x'+`B'[_N] /*
*/
if `touse' & `ismiss'
|
|
base/i/ivpoisson.ado:
|
558 [+]
|
qui
replace
`normwt' = r(N)*`normwt'/r(sum)
|
|
base/i/ivregress.ado:
|
255 [+]
|
qui
replace
`normwt' = r(N)*`normwt'/r(sum)
if `touse'
|
|
base/i/ivregress_estat.ado:
|
1281 [+]
|
qui
replace
`normwt' = r(N)*`normwt' / r(sum)
|
|
base/k/kdensity.ado:
|
207 [+]
|
qui
replace
`m' = r(min)-`wwidth'+(_n-1)*`delta'
in 1/`n'
|
|
base/k/kdensity_7.ado:
|
128 [+]
|
qui
replace
`m' = r(min)-`wwidth'+(_n-1)*`delta'
in 1/`n'
|
|
:
|
178 [+]
|
qui
replace
`tden' = `tden'/(`ft'[_N]*`scale')
|
|
base/l/lfit.ado:
|
348 [+]
|
gen
double `qx' = cond(`m'==1, `dw'*`x'[1]/`w'[1],
cond((_n-1)*`dw'>=`w'[`m'-1],
`dw'*(`x'[`m']-`x'[`m'-1])/(`w'[`m']-`w'[`m'-1]),
(_n*`dw'-`w'[`m'-1])
+ `x'[`m'-1] ))
in 1/`group'
-
*(`x'[`m']-`x'[`m'-1])/(`w'[`m']-`w'[`m'-1])
gen double `qx' = cond(`m'==1, `dw'*`x'[1]/`w'[1],
cond((_n-1)*`dw'>=`w'[`m'-1],
`dw'*(`x'[`m']-`x'[`m'-1])/(`w'[`m']-`w'[`m'-1]),
(_n*`dw'-`w'[`m'-1])
+ `x'[`m'-1] ))
in 1/`group'
|
|
:
|
355 [+]
|
replace
`qx' = `qx' - `x'[`m'[_n-1]]
+ cond(`m'[_n-1]==1,
(`w'[1]-(_n-1)*`dw')*`x'[1]/`w'[1],
(`w'[`m'[_n-1]]-(_n-1)*`dw')
/(`w'[`m'[_n-1]]-`w'[`m'[_n-1]-1]) )
in 2/`group'
if `m'>1 & (_n-1)*`dw'<`w'[`m'-1]
-
*(`x'[`m'[_n-1]]-`x'[`m'[_n-1]-1])
replace `qx' = `qx' - `x'[`m'[_n-1]]
+ cond(`m'[_n-1]==1,
(`w'[1]-(_n-1)*`dw')*`x'[1]/`w'[1],
(`w'[`m'[_n-1]]-(_n-1)*`dw')
/(`w'[`m'[_n-1]]-`w'[`m'[_n-1]-1]) )
in 2/`group'
if `m'>1 & (_n-1)*`dw'<`w'[`m'-1]
|
|
base/l/lloghet_glf.ado:
|
42 [+]
|
replace
`g3' = -`a'*`th'*exp(-`c')*`f' + /*
*/ (`c'-`c0')/`th' + exp(-`c0')*`f0'
|
|
:
|
45 [+]
|
replace
`b' = (`b'-1)*`ga'/`b'
All properties
| key |
content |
| command |
replace |
| indent |
2 |
| parameters |
`b' = (`b'-1)*`ga'/`b' |
|
|
:
|
46 [+]
|
replace
`b0' = cond(`t0'>0,(`b0'-1)*`ga'/`b0',0)
|
|
:
|
55 [+]
|
replace
`g2' = -`a'*`th'*exp(-`c')*`b' + exp(-`c0')*`b0' + /*
*/ `d'*(`ga'*(`beta'-ln(`t'))-1-`b')
|
|
:
|
68 [+]
|
gen
double `h' = -`b'*`ga'* /*
*/ (-`b'*(`t'*exp(-`beta'))^(-`ga')+1)
if $ML_samp
|
|
:
|
70 [+]
|
gen
double `h0' = cond(`t0'>0,-`b0'*`ga'* /*
*/ (-`b0'*(`t0'*exp(-`beta'))^(-`ga')+1),0)
if $ML_samp
|
|
base/l/lloghet_glf_sh.ado:
|
64 [+]
|
gen
double `logst' = `iga'*( (1-1/`F')*`lntmu' - /*
*/ (1-1/`F0')*`lntmu0' )
|
|
base/l/lloghet_ilf.ado:
|
54 [+]
|
replace
`g1' = `ga'*(`f'*`c' - `f0'*`c0' + `d'* /*
*/ (`f'*(1+`th'*`c'*`c') - 1))
|
|
:
|
61 [+]
|
replace
`g2' = (`h0'*`c0' - `h'*`c')/`ga' - `d'* /*
*/ (1 + ln(`t')*`ga' - `beta'*`ga' + `h'/`ga'* /*
*/ (`th'*`c'*`c'+1))
|
|
base/l/lloghet_ilf_sh.ado:
|
67 [+]
|
gen
double `logst' = `iga'*((1-1/`F')*`lntmu' - /*
*/ (1-1/`F0')*`lntmu0' )
|
|
:
|
144 [+]
|
replace
`dz' = cond(`sumd'<., /*
*/ -(1/`c' - 1)*`ith'^2 + /*
*/ `c'*`sums'*(`a'*`sums' - `ith') , 0) /*
*/
if $ML_samp
|
|
base/l/lloghet_ip.ado:
|
137 [+]
|
gen
`vtyp' `varn'=exp(`xb')*`cc'
if `touse'
|
|
base/l/lnorm_lf.ado:
|
40 [+]
|
qui
replace
`w1'=`d'*( (1/`es')*`lntxb' - `R'/`es') /*
*/ + `R'/`es' - cond(`t0'>0, `R0'/`es', 0)
|
|
:
|
58 [+]
|
gen
double `f'=`d'*( (-1/`e2s') /*
*/ -(1/`e2s')*((`lntxb')*`net'*`et' /*
*/ -`net'*`net' )/(`et'*`et') ) /*
*/ +(1/`e2s')*((`lntxb')*`net'*`et' /*
*/ -`net'*`net' )/(`et'*`et')
|
|
:
|
70 [+]
|
replace
`f'=`d'*((-2/`es')*`lntxb' /*
*/ -(1/`es')* ( -`R'+ ((`lntxb'^2)*`net'*`et' /*
*/ -`net'*`net'*`lntxb')/(`et'*`et')) ) /*
*/ +(1/`es')* ( -`R'+ ((`lntxb'^2)*`net'*`et' /*
*/ -`net'*`net'*`lntxb')/(`et'*`et'))
|
|
:
|
76 [+]
|
replace
`f'=`f'-(1/`es')* ( -`R0'+ /*
*/ ((`lntxb0'^2)*`net0'*`et0' /*
*/ -`net0'*`net0'*`lntxb0')/(`et0'*`et0')) /*
*/
if `t0'>0
|
|
:
|
84 [+]
|
replace
`f'=`d'*( -2*(`lntxb'^2) /*
*/ -`lntxb'*( ( (`lntxb'^2)*`net'*`et' /*
*/ -`net'*`net'*`lntxb') /(`et'*`et')) /*
*/ +`lntxb'*`R' ) /*
*/ +`lntxb'*(( (`lntxb'^2)*`net'*`et' /*
*/ -`net'*`net'*`lntxb')/(`et'*`et')) /*
*/ -`lntxb'*`R'
|
|
:
|
91 [+]
|
replace
`f'=`f' /*
*/ -`lntxb0'*(((`lntxb0'^2)*`net0'*`et0' /*
*/ -`net0'*`net0'*`lntxb0') /(`et0'*`et0')) /*
*/ +`lntxb0'*`R0'
if `t0'>0
|
|
base/l/lnormhet_ilf.ado:
|
77 [+]
|
replace
`c' = `f'*(`c'-`th'*`h'*`h'*`f'*`f') - /*
*/ `d'*(-1+2*`th'*`th'*`h'*`h'*(`f'^4) + /*
*/ (1-`th'*`f'*`f')*`c')
|
|
base/l/lnormhet_ilf_sh.ado:
|
148 [+]
|
replace
`dz' = cond(`sumd'<., /*
*/ -(1/`c' - 1)*`ith'^2 + /*
*/ `c'*`sums'*(`a'*`sums' - `ith') , 0) /*
*/
if $ML_samp
|
|
base/l/logis_lf.ado:
|
33 [+]
|
qui
replace
`w1'=-(`d'*`g'-(1+`d')*`et'*`g'/(1+`et'))
|
|
:
|
40 [+]
|
qui
replace
`w2'=-(`d'*(`I'*`g' +1+`g'*log(`t')) /*
*/ -(1+`d')*`et'*(`I'+log(`t'))*`g'/(1+`et'))
|
|
:
|
42 [+]
|
qui
replace
`w2' =`w2' - `et0'*(`I'+log(`t0'))*`g'/(1+`et0') /*
*/
if `t0'> 0
|
|
:
|
71 [+]
|
qui
replace
`C'=`d'*`g'*(`xblnt') /*
*/ -(1+`d')*`et'*`g'*`xblnt'* /*
*/ ((`xblnt'*`g')+1+`et')/(1+`et')^2
|
|
base/l/logit_p.ado:
|
231 [+]
|
by `keep' `rhs':
gen
long `y'=cond(_n==_N, /*
*/ sum((`e(depvar)'!=0 & `e(depvar)'<.)*`w'), .)
|
|
:
|
258 [+]
|
replace
`s' = `m'*`p'*(1-`p')*`s'*`s'
if `keep'
|
|
base/l/logrank.ado:
|
258 [+]
|
gen
double `wi' = sum( `ni'*(`n'-`ni')*`cons' )
|
|
base/l/lowess.ado:
|
208 [+]
|
replace
`ys' = `ys'* r(mean)/`mean'
if `touse'
|
|
base/l/lowess_7.ado:
|
147 [+]
|
replace
`ys' = `ys'* r(mean)/`mean'
if `touse'
|
|
base/l/lpoly.ado:
|
284 [+]
|
qui
replace
`xgrid' = r(min) + (_n - 1)*`delta'
in 1/`n'
|
|
base/l/lpredict.ado:
|
89 [+]
|
by `keep' `rhs':
gen
long `y'=cond(_n==_N, /*
*/ sum((`l'!=0 & `l'!=.)*`w') ,.)
|
|
:
|
111 [+]
|
replace
`new'=`m'*`p'*(1-`p')*`rthat'*`rthat'
|
|
base/l/lsens_x.ado:
|
23 [+]
|
gen
double `sumy' = sum((`y'==0)*`w')
if `touse'
|
|
:
|
29 [+]
|
replace
`sumy' = sum((`y'!=0)*`w')
if `touse'
|
|
base/l/ltable.ado:
|
207 [+]
|
gen
`H' = 2*`fail'/((2-`fail')*`dI')
|
|
base/l/ltable_7.ado:
|
131 [+]
|
gen
`H' = 2*`fail'/((2-`fail')*`dI')
|
|
base/l/ltable_9.ado:
|
183 [+]
|
gen
`H' = 2*`fail'/((2-`fail')*`dI')
|
|
base/m/mdslong.ado:
|
363 [+]
|
gen
`j12' = cond(`j1'<`j2', (`j1'-1)*`n'+`j2', (`j2'-1)*`n'+`j1')
|
|
base/m/merge_10.ado:
|
198 [+]
|
qui
recode
`_merge'?* (1 .=0) (2/5=1)
All properties
| key |
content |
| command |
recode |
| indent |
3 |
| parameters |
`_merge'?* (1 .=0) (2/5=1) |
| prefix |
qui |
|
|
base/m/mfp_10.ado:
|
445 [+]
|
cap
drop
`stub`i''*
All properties
| key |
content |
| command |
drop |
| indent |
2 |
| parameters |
`stub`i''* |
| prefix |
cap |
|
|
base/m/mgarch_dvech_p.ado:
|
719 [+]
|
qui
predict
double `res'*
if `touse'
, residuals
|
|
base/m/mhodds.ado:
|
239 [+]
|
qui by `touse' `strata' `by':
gen
double `pt'= /*
*/ sum((`d'+`h')*`wt')
if `touse'
|
|
:
|
244 [+]
|
qui by `touse' `strata' `by':
gen
double `p1'= /*
*/ sum((`d'+`h')*`e'*`wt')
if `touse'
|
|
:
|
246 [+]
|
qui by `touse' `strata' `by':
gen
double `p2' = /*
*/ sum((`d'+`h')*`e'*`e'*`wt')
if `touse'
|
|
base/m/ml_5.ado:
|
401 [+]
|
gen
double `sumff' = sum(`ff'*$S_mlwgt)
|
|
:
|
623 [+]
|
qui
gen
double `fatS' = sum(`fmhi'*$S_mlwgt)
|
|
:
|
672 [+]
|
qui
replace
`fatS' = sum(`fmhi'*$S_mlwgt)
|
|
base/n/nbreg.ado:
|
543 [+]
|
qui
replace
`z' = lngamma(`y'+exp(`z')) - lngamma(`y'+1) /*
*/ - lngamma(exp(`z')) + `lndelta'*`y' - (`y'+exp(`z'))*`lnoned' `if'
|
|
base/n/nbreg_al.ado:
|
45 [+]
|
qui
replace
`g2' = `y' - (`y'+`m')*`delta'/(1+`delta') - `g1' /*
*/
if $ML_samp
|
|
base/n/newey.ado:
|
165 [+]
|
replace
`vt1' = `x'*`e'* /*
*/ l`j'.`e'*l`j'.`wvar'* /*
*/ `ow'
if `touse'
|
|
base/n/newey_7.ado:
|
116 [+]
|
replace
`vt1' = `x'[_n-`j']*`e'* /*
*/ `e'[_n-`j']*`wvar'[_n-`j']* /*
*/ `ow'
if `touse'
|
|
base/n/nl_p.ado:
|
211 [+]
|
qui
replace
`varlist' = `plow'*`lb' + /*
*/ (1-`plow')*`e' /*
*/ if !mi(`lb') & mi(`ub') & `touse'
|
|
:
|
214 [+]
|
qui
replace
`varlist' = `pmid'*`e' + /*
*/ (1-`pmid')*`ub' /*
*/ if mi(`lb') & !mi(`ub') & `touse'
|
|
:
|
217 [+]
|
qui
replace
`varlist' = `plow' * `lb' + /*
*/ `pmid'*`e' + (1-`plow'-`pmid')*`ub' /*
*/ if !mi(`lb') & !mi(`ub') & `touse'
|
|
base/n/nlog_rd.ado:
|
110 [+]
|
qui
replace
`di' = /*
*/ (${ML_y`m'} - `p`j''*${ML_y`k'})
if `touse'
|
|
:
|
223 [+]
|
qui
replace
`ck' = cond($ML_y1,`Ij'* ///
(cond(${ML_y`l2'}==`jlev',1,0)+`dldtj'),0)
-
qui replace `ck' = cond($ML_y1,`Ij'* ///
(cond(${ML_y`l2'}==`jlev',1,0)+`dldtj'),0)
|
|
base/n/nlsur.ado:
|
493 [+]
|
qui
replace
`normwt' = r(N)*`normwt'/r(sum)
|
|
base/o/orthog.ado:
|
72 [+]
|
replace
`x`j'' = `x`j'' - r(mean)*`x`i''
|
|
:
|
100 [+]
|
replace
`x`j'' = `x`j'' - r(mean)*`x`i''
|
|
base/o/orthpoly.ado:
|
66 [+]
|
gen
double `q`i'' = (`a'*`x' + `b')*`q`j'' /*
*/ - `c'*`q`k''
if `doit'
|
|
base/p/probit_p.ado:
|
180 [+]
|
by `keep' `uorhs':
gen
long `y'=cond(_n==_N, /*
*/ sum((`e(depvar)'!=0 & `e(depvar)'<.)*`w'), .)
|
|
base/q/qreg_c.ado:
|
32 [+]
|
qui
replace
`r'=cond(`r'>=0,`quant',`quant'-1)*`r'
|
|
base/q/quantile.ado:
|
25 [+]
|
gen
`LINE'=`QUANT'[1] + `CNT'* /*
*/ ((`QUANT'[`CNT'[_N]]-`QUANT'[1])/`CNT'[_N])
|
|
base/q/quantile_7.ado:
|
11 [+]
|
gen
`LINE'=`QUANT'[1] + `CNT'* /*
*/ ((`QUANT'[`CNT'[_N]]-`QUANT'[1])/`CNT'[_N])
|
|
base/r/regre_p2.ado:
|
126 [+]
|
replace
`Y' = `p'*`E' + (1-`p')*`lb' /*
*/
if `touse' & `lb'!=. & `ub'==.
|
|
:
|
128 [+]
|
replace
`Y' = `p'*`E' + (1-`p')*`ub' /*
*/
if `touse' & `lb'==. & `ub'!=.
|
|
:
|
130 [+]
|
replace
`Y' = `p'*`E' + `p2'*`lb' + (1-`p'-`p2')*`ub' /*
*/
if `touse' & `lb'!=. & `ub'!=.
|
|
base/r/regres_p.ado:
|
250 [+]
|
gen
`type' `newvar'=`RSTU'*`RES'/sqrt((1-`HAT')*`SRES'[_N])
|
|
base/r/rocreg_p.ado:
|
407 [+]
|
qui
replace
`intercept_`varit'' = ///
`bmat'[1,`icr']*`ivar'+
|
|
base/r/rocregstat.ado:
|
342 [+]
|
qui
gen
double `roc_`vvit''= ///
`eb'[1,`ic'] + ///
`eb'[1,`sc']*`lirc'
|
|
base/r/roctab.ado:
|
615 [+]
|
by `touse' `C':
gen
`row1' = sum(`touse'*(1-`D')*`wv')
|
|
:
|
628 [+]
|
gen
`row6' = `row3'*(`row4'*(`row4'+`row1')+(1/3)*`row1'^2)
if `touse'
|
|
:
|
631 [+]
|
gen
`row7' = `row1'*(`row2'*(`row2'+`row3')+(1/3)*`row3'^2)
if `touse'
|
|
base/r/roctab_7.ado:
|
499 [+]
|
by `touse' `C':
gen
`row1' = sum(`touse'*(1-`D')*`wv')
|
|
:
|
512 [+]
|
gen
`row6' = `row3'*(`row4'*(`row4'+`row1')+(1/3)*`row1'^2)
if `touse'
|
|
:
|
515 [+]
|
gen
`row7' = `row1'*(`row2'*(`row2'+`row3')+(1/3)*`row3'^2)
if `touse'
|
|
base/r/rologit_p.ado:
|
94 [+]
|
gen
`vtyp' `varn' = `p'*(1-`p')*`b'
if `touse'
|
|
base/r/rreg.ado:
|
182 [+]
|
replace
`y'= `y' + /*
*/ (`lambda'*`scale'/`aa')*(`res'/`scale')*`weight' /*
*/
if `touse'
|
|
base/s/sample.ado:
|
89 [+]
|
by `by':
replace
`N'=int(`N'[_N]*`exp'/100+.5)
|
|
base/s/sem.ado:
|
81 [+]
|
capture
drop
`SEM'*
All properties
| key |
content |
| command |
drop |
| indent |
2 |
| parameters |
`SEM'* |
| prefix |
capture |
|
|
base/s/slogit_d2.ado:
|
31 [+]
|
replace
`p`i'' = `p`i'' - el(`phi`dm'',1,`i')*`xb`dm''
|
|
base/s/stmh.ado:
|
193 [+]
|
by `str' `by':
gen
double `d1' = /*
*/ sum(`wt'*_d *`e')
|
|
:
|
204 [+]
|
gen
double `d1' = sum(`wt'*_d *`e')
|
|
base/s/stphtest.ado:
|
229 [+]
|
gen
double `wrk' = sum(cond(e(sample), /*
*/ (`rnk'-`rvar')*``i'', 0))
|
|
:
|
265 [+]
|
gen
double `gnum' = sum(cond(e(sample), /*
*/ (`rnk'-`rvar')*``i'',0))
|
|
base/s/stphtest_7.ado:
|
205 [+]
|
gen
double `wrk' = sum(cond(e(sample), /*
*/ (`rnk'-`rvar')*``i'', 0))
|
|
:
|
241 [+]
|
gen
double `gnum' = sum(cond(e(sample), /*
*/ (`rnk'-`rvar')*``i'',0))
|
|
base/s/suest.ado:
|
184 [+]
|
capture
predict
double `sci'*
if `esamp'
, score
|
|
base/s/svygen.ado:
|
78 [+]
|
quietly by `by' :
replace
`wgt' = (_n==1)*`postwt'
|
|
base/s/svytab.ado:
|
771 [+]
|
gen
double `x' = ($S_VYexp)*`y'
|
|
:
|
1438 [+]
|
gen
double `xc' = e(total)*`bij'
in 1/`ncat'
|
|
:
|
1441 [+]
|
replace
`xc' = e(total)*`matr'[1,_n-`Nr1'+1] /*
*/
in `Nr1'/`Nr2'
|
|
:
|
1443 [+]
|
replace
`xc' = e(total)*`matc'[1,_n-`Nc1'+1] /*
*/
in `Nc1'/`Nc2'
|
|
:
|
1527 [+]
|
replace
`xse' = `porp'* /*
*/ sqrt(`V'[_n-`Nr1'+1, /*
*/ _n-`Nr1'+1])
in `Nr1'/`Nr2'
|
|
:
|
1533 [+]
|
replace
`xse' = `porp'* /*
*/ sqrt(`V'[_n-`Nc1'+1, /*
*/ _n-`Nc1'+1])
in `Nc1'/`Nc2'
|
|
base/s/svytab_7.ado:
|
759 [+]
|
gen
double `x' = ($S_VYexp)*`y'
|
|
:
|
1349 [+]
|
gen
double `xc' = e(total)*`bij'
in 1/`ncat'
|
|
:
|
1352 [+]
|
replace
`xc' = e(total)*`matr'[1,_n-`Nr1'+1] /*
*/
in `Nr1'/`Nr2'
|
|
:
|
1354 [+]
|
replace
`xc' = e(total)*`matc'[1,_n-`Nc1'+1] /*
*/
in `Nc1'/`Nc2'
|
|
:
|
1436 [+]
|
replace
`xse' = `porp'* /*
*/ sqrt(`V'[_n-`Nr1'+1, /*
*/ _n-`Nr1'+1])
in `Nr1'/`Nr2'
|
|
:
|
1442 [+]
|
replace
`xse' = `porp'* /*
*/ sqrt(`V'[_n-`Nc1'+1, /*
*/ _n-`Nc1'+1])
in `Nc1'/`Nc2'
|
|
base/s/symmetry.ado:
|
240 [+]
|
gen
v`i'= 0
All properties
| key |
content |
| command |
gen |
| indent |
5 |
| parameters |
v`i'= 0 |
|
|
:
|
252 [+]
|
by `myval':
replace
v`i'=_n-1
All properties
| key |
content |
| command |
replace |
| indent |
5 |
| parameters |
v`i'=_n-1 |
| prefix |
by `myval': |
|
|
:
|
256 [+]
|
replace
nnp= nnp /*
*/ * comb(`den`j'',v`j')*(0.5)^`den`j''
|
|
:
|
268 [+]
|
replace
np=np*comb(`den`i'',v`i')*(0.5)^`den`i''
|
|
:
|
269 [+]
|
replace
eq=eq+1
if `den`i'' - v`i' == v`i'
|
|
base/t/tnbreg.ado:
|
650 [+]
|
qui
replace
`z' = lngamma(`y'+exp(`z')) - lngamma(`y'+1) /*
*/ - lngamma(exp(`z')) + `lndelta'*`y' - (`y'+exp(`z'))*`lnoned' /*
*/ - ln(nbinomialtail(exp(`z'),$ztnb_tp+1,(1+exp(`mudelta')) )) `if'
|
|
base/t/tnbreg_cons.ado:
|
114 [+]
|
qui
gen
double `f2' = `y' -(`y'+`m')*`delta'/
All properties
| key |
content |
| command |
gen |
| comment |
///
(1+`delta') - `z2' if $ML_samp |
| indent |
2 |
| parameters |
double `f2' = `y' -(`y'+`m')*`delta'/ |
| prefix |
qui |
|
|
base/t/tnbreg_mean.ado:
|
160 [+]
|
qui
gen
double `z3' = cond($ML_samp & `tp'==0, ///
-`p'^(`m'+1)*`mu'/ `z2', ///
cond($ML_samp & `tp'>0, ///
-(`x3'-`x2')/(2*`h2'), .))
-
qui gen double `z3' = cond($ML_samp & `tp'==0, ///
-`p'^(`m'+1)*`mu'/ `z2', ///
cond($ML_samp & `tp'>0, ///
-(`x3'-`x2')/(2*`h2'), .))
|
|
base/t/treatr_p.ado:
|
157 [+]
|
gen
`vtyp' `varn' = `Xb'- `trtname'*[`depname']_b[`trtname'] /*
*/ + [`depname']_b[`trtname'] + (normd(`Xbprb') / /*
*/ normprob(`Xbprb')) * `sigma' * `rho'
|
|
:
|
166 [+]
|
gen
`vtyp' `varn' = `Xb'- `trtname'*[`depname']_b[`trtname'] /*
*/ - (normd(`Xbprb')/normprob(-`Xbprb')) /*
*/ * `sigma' * `rho'
|
|
base/t/trnb_cons.ado:
|
48 [+]
|
qui
replace
`g1' = `z2'-(1+`delta')^(-`m')*`lnoned'*`m' /*
*/ / `z3'
if $ML_samp
|
|
:
|
51 [+]
|
qui
replace
`g2' = `y' -(`y'+`m')*`delta'/(1+`delta') - `z2' /*
*/ + (1+ `delta')^(-`m')*(`m'*ln(1+`delta') /*
*/ -`mu'/(1+`delta') )/ `z3'
if $ML_samp
|
|
base/t/trnb_mean.ado:
|
45 [+]
|
replace
`sc1' = `p'*(`y'-`mu') - /*
*/ `p'^(`m'+1)*`mu'/ `z2'
if $ML_samp
|
|
base/u/u_mi_impute_fv2var.ado:
|
11 [+]
|
cap
drop
`fvstub'*
All properties
| key |
content |
| command |
drop |
| indent |
2 |
| parameters |
`fvstub'* |
| prefix |
cap |
|
|
base/w/weib1_lf.ado:
|
38 [+]
|
replace
`g2' = /*
*/ `p'*(((`xb'-`lnt')*`eplnt' - (`xb'-`lnt0')*`eplnt0') /*
*/ + `d'*((`lnt'-`xb' + 1/`p')))
|
|
base/w/weibhet_glfa.ado:
|
25 [+]
|
gen
double `b' = exp(-`beta'*`p')*`t'^`p'
if $ML_samp
|
|
:
|
26 [+]
|
gen
double `b0' = cond(`t0'>0, exp(-`beta'*`p')*`t0'^`p',0) /*
*/
if $ML_samp
|
|
base/w/weibhet_gp.ado:
|
180 [+]
|
qui
gen
double `kk' = exp(`xb')*`t'^(`auxp'-1) /*
*/
if `touse'
|
|
:
|
195 [+]
|
qui
gen
double `ff'= 1+`theta'*exp(`xb')*`t'^`auxp' /*
*/
if `touse'
|
|
:
|
197 [+]
|
qui
gen
double `ff0'= 1+`theta'*exp(`xb')*`t0'^`auxp' /*
*/
if `t0'>0 & `touse'
|
|
:
|
226 [+]
|
qui
gen
double `ff'= /*
*/ (`d'!=0)-(1/`theta')* /*
*/ ln(1+`theta'*exp(`xb')*`t'^`auxp')
if `touse'
|
|
:
|
229 [+]
|
qui
replace
/*
*/ `ff'=`ff'+(1/`theta')* /*
*/ ln(1+`theta'*exp(`xb')*`t0'^`auxp') /*
*/
if `t0'>0 & `touse'
|
|
base/w/weibhet_ilf.ado:
|
26 [+]
|
gen
double `b' = exp(`beta')*`t'^`p'
if $ML_samp
|
|
:
|
27 [+]
|
gen
double `b0' = cond(`t0'>0, exp(`beta')*`t0'^`p',0) /*
*/
if $ML_samp
|
|
:
|
41 [+]
|
replace
`g1' = -`f' + `f0' + `d'* /*
*/ (1 - `th'*`f'/`c')
All properties
| key |
content |
| command |
replace |
| indent |
2 |
| parameters |
`g1' = -`f' + `f0' + `d'* /*
*/ (1 - `th'*`f'/`c') |
|
|
:
|
43 [+]
|
replace
`g2' = (-`f'*`lnt' + `f0'*`lnt0' + `d'*`lnt'* /*
*/ (1-`th'*`f'/`c'))*`p' + `d'
|
|
base/w/weibhet_ilf_sh.ado:
|
128 [+]
|
replace
`dz' = cond(`sumd'!=., /*
*/ -(1/`c' - 1)*`ith'^2 + /*
*/ `c'*`sums'*(`a'*`sums' - `ith') , 0) /*
*/
if $ML_samp
|
|
base/w/weibhet_ilfa_sh.ado:
|
136 [+]
|
replace
`dz' = cond(`sumd'!=., /*
*/ -(1/`c' - 1)*`ith'^2 + /*
*/ `c'*`sums'*(`a'*`sums' - `ith') , 0) /*
*/
if $ML_samp
|
|
base/w/weibhet_ip.ado:
|
183 [+]
|
qui
gen
double `kk' = exp(`xb')*`t'^(`auxp'-1)
if `touse'
|
|
:
|
197 [+]
|
qui
gen
double `ff'= 1+2*`theta'*exp(`xb')*`t'^`auxp' /*
*/
if `touse'
|
|
:
|
199 [+]
|
qui
gen
double `ff0'= 1+2*`theta'*exp(`xb')*`t0'^`auxp' /*
*/
if `t0'>0 & `touse'
|
|
:
|
228 [+]
|
qui
gen
double `ff'= /*
*/ (`d'!=0)+(1/`theta')* /*
*/ (1-sqrt(1+2*`theta'*exp(`xb')*`t'^`auxp'))
if `touse'
|
|
:
|
231 [+]
|
qui
replace
/*
*/ `ff'=`ff'-(1/`theta')* /*
*/ (1-sqrt(1+2*`theta'*exp(`xb')*`t0'^`auxp')) /*
*/
if `t0'>0 & `touse'
|
|
base/w/weibul_p.ado:
|
237 [+]
|
gen
`vtyp' `varn' = /*
*/ exp( -exp(`rgn'*`xb')* `t'^`aux_p' ) / /*
*/ exp( -exp(`rgn'*`xb')*`t0'^`aux_p' )
if `touse'
|
|
base/w/wntestb_7.ado:
|
297 [+]
|
gen
int `mapy' = ($S_GPH_ay)*`y' + ($S_GPH_by)
|
|
:
|
298 [+]
|
gen
int `mapx' = ($S_GPH_ax)*`x' + ($S_GPH_bx)
|
|
:
|
315 [+]
|
gen
int `mapy1'=($S_GPH_ay)*`inarg' + ($S_GPH_by)
|
|
:
|
317 [+]
|
gen
int `mapx1'=($S_GPH_ax)*`inarg' + ($S_GPH_bx)
|
|
:
|
333 [+]
|
replace
`mapy2'=($S_GPH_ay)*`inarg' + ($S_GPH_by)
|
|
:
|
336 [+]
|
replace
`mapx2'=($S_GPH_ax)*`inarg' + ($S_GPH_bx)
|
|
:
|
396 [+]
|
gen
int `mapy' = ($S_GPH_ay)*`y' + ($S_GPH_by)
|
|
:
|
397 [+]
|
gen
int `mapx' = ($S_GPH_ax)*`x' + ($S_GPH_bx)
|
|
:
|
489 [+]
|
gen
int `mapy' = ($S_GPH_ay)*`y' + ($S_GPH_by)
|
|
:
|
490 [+]
|
gen
int `mapx' = ($S_GPH_ax)*`x' + ($S_GPH_bx)
|
|
base/x/xi.ado:
|
423 [+]
|
label
var `stub'`num1' "(`lbl1')*`part2'"
|
|
base/x/xi_6.ado:
|
215 [+]
|
label
var `stub'`num1' "(`lbl1')*`part2'"
|
|
base/x/xpose.ado:
|
192 [+]
|
qui
gen
`type' v`i' = .
All properties
| key |
content |
| command |
gen |
| indent |
2 |
| parameters |
`type' v`i' = . |
| prefix |
qui |
|
|
:
|
202 [+]
|
qui
replace
v`i' = `val'
in `j'
All properties
| key |
content |
| command |
replace |
| in |
`j' |
| indent |
3 |
| parameters |
v`i' = `val' |
| prefix |
qui |
|
|
:
|
213 [+]
|
rename
v`i' ``i''
All properties
| key |
content |
| command |
rename |
| indent |
4 |
| parameters |
v`i' ``i'' |
|
|
base/x/xtcloglog.ado:
|
420 [+]
|
gen
double `logFc' = log((`sn'==1) -`sn'* exp(-exp(`xb')))
if `touse'
|
|
base/x/xtgee.ado:
|
1564 [+]
|
replace
`dj' = 2*(`y'*ln(`y'/`mu')-(1+`k'*`y')/`k'* /*
*/ ln((1+`k'*`y')/(1+`k'*`mu')))
if `y'
|
|
:
|
1666 [+]
|
replace
`dj' = 2*(`y'*ln(`y'/`mu')-(1+`k'*`y')/`k'* /*
*/ ln((1+`k'*`y')/(1+`k'*`mu')))
if `y'
|
|
base/x/xtgee_p.ado:
|
229 [+]
|
qui
replace
`xb' = (`e(power)'*`xb'+1)^(1/`e(power)') /*
*/
if `touse'
|
|
base/x/xtgee_plink.ado:
|
42 [+]
|
replace
`m' = (`m'/`N'*.9999)*`N'
All properties
| key |
content |
| command |
replace |
| indent |
3 |
| parameters |
`m' = (`m'/`N'*.9999)*`N' |
|
|
base/x/xtgls.ado:
|
681 [+]
|
gen
double ${X_ee}`i' = $X_ee[`b0'+_n]
in 1/$X_nt
|
|
base/x/xtregar.ado:
|
308 [+]
|
qui by `id':
gen
`tvar'=(sqrt(1-`rho'^2))*`x'
if _n==1
|
|
:
|
554 [+]
|
replace
`g_i'=sqrt(1-`rho'^2)*`g_i'
|
|
:
|
1143 [+]
|
by `id':
gen
double `zresLD'=(`zres'-`zres'[_n-1]*`Itj')^2
|
|
base/x/xtsf_ll.ado:
|
76 [+]
|
gen
double `denom' = sqrt(`gamma'*(1-`gamma')*`sigmaS2' /*
*/ *(1+(`eta2'-1)*`gamma'))
if $ML_samp
|
|
:
|
83 [+]
|
gen
double `f' = -1/2*`T'*(ln(2*_pi)+ln(`sigmaS2')) /*
*/ - 1/2*(`T'-1)*ln(1-`gamma') /*
*/ - 1/2*ln(1+(`eta2'-1)*`gamma') /*
*/ - ln(normprob(`z')) - 1/2*`z'^2 /*
*/ + ln(normprob(`zi')) /*
*/ + 1/2*`zi'^2 /*
*/ - 1/2*(`e2'/((1-`gamma')*`sigmaS2'))
|
|
:
|
143 [+]
|
gen
double `dne' = /*
*/ `sigmaS2'*(`gamma'-`gamma'^2)*`gamma'*`deta2'
|
|
:
|
151 [+]
|
gen
double `dzgamma' = -(`mu'+$S_COST*`eta_e')/`denom' /*
*/ - 0.5*(`mu'*(1-`gamma')-$S_COST*`gamma'*`eta_e') /*
*/ *`dng'/(`denom'^3)
|
|
:
|
157 [+]
|
gen
double `dzeta' = -$S_COST*`gamma'*`deta_e'/`denom' /*
*/ - (`mu'*(1-`gamma')-$S_COST*`gamma'*`eta_e')*0.5 /*
*/ *`dne'/`denom'^3
|
|
base/x/xtsf_llti.ado:
|
71 [+]
|
gen
double `denom' = sqrt(`gamma'*(1-`gamma')*`sigmaS2' /*
*/ *(1+(`eta2'-1)*`gamma'))
if $ML_samp
|
|
:
|
78 [+]
|
gen
double `f' = -1/2*`T'*(ln(2*_pi)+ln(`sigmaS2')) /*
*/ - 1/2*(`T'-1)*ln(1-`gamma') /*
*/ - 1/2*ln(1+(`eta2'-1)*`gamma') /*
*/ - ln(normprob(`z')) - 1/2*`z'^2 /*
*/ + ln(normprob(`zi')) /*
*/ + 1/2*`zi'^2 /*
*/ - 1/2*(`e2'/((1-`gamma')*`sigmaS2'))
if $ML_samp
|
|
:
|
131 [+]
|
gen
double `dzgamma' = -(`mu'+$S_COST*`eta_e')/`denom' /*
*/ - 0.5*(`mu'*(1-`gamma')-$S_COST*`gamma'*`eta_e') /*
*/ *`dng'/(`denom'^3)
|
|
base/z/zinb_llf.ado:
|
39 [+]
|
qui
gen
double `fz' = exp(`zg')*`f1'*`f1'
if $ML_samp
|
|
:
|
71 [+]
|
qui
replace
`ttt' = cond(`y' == 0,
(-`f1'*`mu'*`p'^(`m'+1)*
(`alpha'*`mu'*(`m'+1)*`p'-1))/`f2' +
`sc1'*`sc1',
`alpha'*`mu'*`p'^2*(`y'-`mu')+`mu'*`p' )
if $ML_samp
|
|
:
|
84 [+]
|
qui
replace
`ttt' = cond(`y' == 0,
(-`f1'*`mu'*`p'^(`m'+1)*((`m'+1)*`mu'*`p'+
`m'*`m'*ln(`p')))/`f2' +
`f1'*`f1'*`mu'*`p'^(2*`m'+1)*(`m'*`mu'*`p'+
`m'*`m'*ln(`p'))/(`f2'*`f2'),
`mu'*`p'^2*(`y'-`mu') )
if $ML_samp
-
qui replace `ttt' = cond(`y' == 0,
(-`f1'*`mu'*`p'^(`m'+1)*((`m'+1)*`mu'*`p'+
`m'*`m'*ln(`p')))/`f2' +
`f1'*`f1'*`mu'*`p'^(2*`m'+1)*(`m'*`mu'*`p'+
`m'*`m'*ln(`p'))/(`f2'*`f2'),
`mu'*`p'^2*(`y'-`mu') ) if $ML_samp
|
|
:
|
93 [+]
|
qui
replace
`ttt' = cond(`y' == 0 ,
-(1-exp(`zg'))*`f1'*`fz'*(1-`p'^`m') / `f2' +
(`fz'*(1-`p'^`m') / `f2')^2 ,
(1-exp(`zg'))*`f1'*`fz'/`f1' + (`fz'/`f1')^2)
if $ML_samp
|
|
:
|
99 [+]
|
qui
replace
`ttt' = cond(`y' == 0,
-`fz'/`f2'*(1+(1-`p'^`m')*`f1'/`f2')*
`p'^`m'*(`m'*`m'*ln(`p')+`m'*`mu'*`p'),
0 )
if $ML_samp
|
|
base/z/zinb_plf.ado:
|
70 [+]
|
qui
replace
`ttt' = cond(`y' == 0,
(-`f1'*`mu'*`p'^(`m'+1)*
(`alpha'*`mu'*(`m'+1)*`p'-1))/`f2' +
`sc1'*`sc1',
`alpha'*`mu'*`p'^2*(`y'-`mu')+`mu'*`p' )
if $ML_samp
|
|
:
|
77 [+]
|
qui
replace
`ttt' = cond(`y' == 0,
-normd(`zg')*`mu'*`p'^(`m'+1) / `f2' -
`f1'*`mu'*`p'^(`m'+1)*normd(`zg')*(1-`p'^`m') / (`f2'*`f2') ,
0 )
if $ML_samp
|
|
:
|
83 [+]
|
qui
replace
`ttt' = cond(`y' == 0,
(-`f1'*`mu'*`p'^(`m'+1)*((`m'+1)*`mu'*`p'+
`m'*`m'*ln(`p')))/`f2' +
`f1'*`f1'*`mu'*`p'^(2*`m'+1)*(`m'*`mu'*`p'+
`m'*`m'*ln(`p'))/(`f2'*`f2'),
`mu'*`p'^2*(`y'-`mu') )
if $ML_samp
-
qui replace `ttt' = cond(`y' == 0,
(-`f1'*`mu'*`p'^(`m'+1)*((`m'+1)*`mu'*`p'+
`m'*`m'*ln(`p')))/`f2' +
`f1'*`f1'*`mu'*`p'^(2*`m'+1)*(`m'*`mu'*`p'+
`m'*`m'*ln(`p'))/(`f2'*`f2'),
`mu'*`p'^2*(`y'-`mu') ) if $ML_samp
|
|
:
|
98 [+]
|
qui
replace
`ttt' = cond(`y' == 0,
-normd(`zg')/`f2'*(1+(1-`p'^`m')*`f1'/`f2')*
`p'^`m'*(`m'*`m'*ln(`p')+`m'*`mu'*`p'),
0 )
if $ML_samp
|
|
base/z/zip.ado:
|
375 [+]
|
replace
`prhat'=(1-`psihat')*(exp(-1*`muhat') /*
*/ *`muhat'^`dep')/exp(lnfact(`dep')) /*
*/
if `dep'>0 & `dep'<. & `touse'
|
|
base/z/zip_llf.ado:
|
27 [+]
|
qui
gen
double `fz' = exp(`zg')*`f1'*`f1'
if $ML_samp
|
|
:
|
58 [+]
|
qui
replace
`ttt' = cond($ML_y1 == 0,
-`fz'*`lambda'*exp(-`lambda') / `f2' -
`fz'*(1-exp(-`lambda'))*`f1'*
`lambda'*exp(-`lambda') / `f2'^2,
0)
if $ML_samp
|
|
:
|
66 [+]
|
qui
replace
`ttt' = cond($ML_y1 == 0 ,
-(1-exp(`zg'))*`f1'*`fz'*(1-exp(-`lambda')) / `f2' +
(`fz'*(1-exp(-`lambda')) / `f2')^2 ,
(1-exp(`zg'))*`f1'*`fz'/`f1' + (`fz'/`f1')^2)
if $ML_samp
|
|
base/z/zip_plf.ado:
|
58 [+]
|
qui
replace
`ttt' = cond($ML_y1 == 0,
-normd(`zg')*`lambda'*exp(-`lambda') / `f2' -
normd(`zg')*(1-exp(-`lambda'))*`f1'*
`lambda'*exp(-`lambda') / `f2'^2,
0)
if $ML_samp
|
|
base/z/ztnb.ado:
|
501 [+]
|
qui
replace
`z' = lngamma(`y'+exp(`z')) - lngamma(`y'+1) /*
*/ - lngamma(exp(`z')) + `lndelta'*`y' - (`y'+exp(`z'))*`lnoned' /*
*/ - ln(1-(1+exp(-`lndelta'*`mudelta'))) `if'
|
-
-
Script Output
volume: Volume (thousands) Number of Observations
--------------------------- ------------------------------
Total Integers Nonintegers
| # Negative - - -
| # # Zero - - -
| # # Positive 248 236 12
| # # ----- ----- -----
| # # Total 248 236 12
| . # # . . Missing -
+---------------------- -----
4103 23308.3 248
(More than 99 unique values)
Variable | Obs Mean Std. Dev. Min Max
-------------+--------------------------------------------------------
volume | 248 12320.68 2585.929 4103 23308.3
@mean 12320.677
@sd 2585.929
@min 4103.000
@max 23308.300
@example0 11294
@histh 6.299e-06, 3.149e-06, 6.299e-06, .00004409, .00009448, .00019526, .00016377, .00016062, .00004724, .0000189, .00001575, 9.448e-06, 3.149e-06, 6.299e-06, 6.299e-06
@histw 4743.1768, 6023.5298, 7303.8833, 8584.2363, 9864.5898, 11144.943, 12425.297, 13705.65, 14986.003, 16266.356, 17546.711, 18827.063, 20107.416, 21387.77, 22668.123
@type double
@label Volume (thousands)
@class other
@N_unique .
@N 248
|